RFR: 8271946: Cleanup leftovers in Space and subclasses

Stefan Karlsson stefank at openjdk.java.net
Sat Aug 7 06:41:29 UTC 2021


On Fri, 6 Aug 2021 12:31:01 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> There are a number of methods in (Compactible)Space that seem trivially implemented. E.g. obj_size(), adjust_obj_size(), scanned_block_is_obj() etc. I believe they are leftovers from CMS (not sure) but looks like they can be replaced by obj->size() or removed altogether. Also, the the related templated methods scan_and_forward(), scan_and_adjust_pointers() and scan_and_compact() can be directly and mechanically inlined into their callers. It makes the code more readable.
> 
> Testing:
>  - [x] hotspot_gc
>  - [x] tier1
>  - [ ] tier2

Marked as reviewed by stefank (Reviewer).

src/hotspot/share/gc/shared/space.hpp line 319:

> 317: // - scanned_block_size()
> 318: // - adjust_obj_size()
> 319: // - obj_size()

The entire surrounding comment needs to be updated now that these functions have been removed.

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

PR: https://git.openjdk.java.net/jdk/pull/5031



More information about the hotspot-gc-dev mailing list