RFR: 8271946: Cleanup leftovers in Space and subclasses

Roman Kennke rkennke at openjdk.java.net
Fri Aug 6 12:38:38 UTC 2021


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
 - [ ] tier1
 - [ ] tier2

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

Commit messages:
 - 8271946: Cleanup leftovers in Space and subclasses

Changes: https://git.openjdk.java.net/jdk/pull/5031/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5031&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8271946
  Stats: 409 lines in 3 files changed: 160 ins; 244 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5031.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5031/head:pull/5031

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



More information about the hotspot-gc-dev mailing list