JDK-8163577 : Fix code style issues in space.inline.hpp
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-08-10
  • Updated: 2019-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
In recent changes in JDK-8073321 the shared code for full gc has been cleaned up a bit.

There is still opportunity to improve the code further:

- braces after "if" in CompactibleSpace::clear_empty_region

- in CompactibleSpace::scan_and_compact, space->_first_dead can be extracted into a local variable instead of repeated access. Other methods repeatedly read the same variable (like CompactibleSpace::verify_up_to_first_dead) too. Not so much because of performance, but it makes the code easier to read.

- instead of space->bottom(), cur_obj could(!) be used to tighten the code further. There are arguments against it, but it should be thought about again.

All this would tighten the code a bit, making it more readable.