RFR: 8253162: Make frame::oops_do const

Kim Barrett kim.barrett at oracle.com
Tue Sep 15 11:29:06 UTC 2020


> On Sep 15, 2020, at 7:17 AM, Stefan Karlsson <stefank at openjdk.java.net> wrote:
> 
> Make frame::oops_do const, so that we can use a const frame& receiver when appropriate. With this, we can get rid of
> the temporary copies made just to make the frame variable non-const. See for example:
> https://github.com/openjdk/zgc/blob/c4765b5599d07124410f8a80b1acef9349a998e0/src/hotspot/share/gc/z/zStackWatermark.cpp#L96
> 
> -------------
> 
> Commit messages:
> - Make frame::oops_do const
> 
> Changes: https://git.openjdk.java.net/jdk/pull/175/files
> Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=175&range=00
>  Issue: https://bugs.openjdk.java.net/browse/JDK-8253162
>  Stats: 35 lines in 2 files changed: 0 ins; 1 del; 34 mod
>  Patch: https://git.openjdk.java.net/jdk/pull/175.diff
>  Fetch: git fetch https://git.openjdk.java.net/jdk pull/175/head:pull/175
> 
> PR: https://git.openjdk.java.net/jdk/pull/175

------------------------------------------------------------------------------
src/hotspot/share/runtime/frame.cpp
1039 void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) const {

Why is this register map not const?

------------------------------------------------------------------------------

Looks good other than that.




More information about the hotspot-dev mailing list