RFR: 8258459: Decouple gc_globals.hpp from globals.hpp [v2]

Ioi Lam iklam at openjdk.java.net
Mon Jan 4 18:00:59 UTC 2021


On Tue, 22 Dec 2020 13:08:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - fixed copyright year
>>  - Merge branch 'master' into 8258459-decouple-gc-globals-hpp-from-globals-hpp
>>  - comments by coleenp
>>  - fixed copyright year
>>  - 8258459: Decouple gc_globals.hpp from globals.hpp
>
> src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp line 61:
> 
>> 59: }
>> 60: 
>> 61: size_t ThreadLocalAllocBuffer::initial_refill_waste_limit()            { return desired_size() / TLABRefillWasteFraction; }
> 
> nit: please line this up.

Fixed

> src/hotspot/share/oops/oop.inline.hpp line 187:
> 
>> 185:       // disjunct below to fail if the two comparands are computed across such
>> 186:       // a concurrent change.
>> 187:       assert((s == klass->oop_size(this)) ||
> 
> It might be nicer to throw the second half of this assert into the .cpp file, like
> assert(s == klass->oop_size(this) || gc_has_forwarded(), "wrong array object size");
> With the special comment above it in the cpp file.  Then someone has the potential to add more information if the assert fails, and that gets Universe::hpp out of the inline file (if that helps with future cleanups).

I'd like to keep this PR minimal. If I change `(Universe::heap()->is_gc_active() && is_objArray() && is_forwarded() && (get_UseParallelGC() || get_UseG1GC())` to `gc_has_forwarded()`, I would also need to move the comments about `UseParallelGC and UseG1GC can change the length field of an "old copy"...`. I think that should be done in a separate PR.

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

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


More information about the shenandoah-dev mailing list