Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
ed03217
8305895: Implement JEP 450: Compact Object Headers (Experimental)
rkennke Aug 22, 2024
18e08c1
Add missing newline
rkennke Aug 22, 2024
1578ffa
Remove hashcode leftovers from SA
rkennke Aug 22, 2024
7009e14
Fix hash_mask_in_place in ClhsdbLongConstant test
rkennke Aug 22, 2024
5ffc582
Fix hash shift for 32 bit builds
rkennke Aug 22, 2024
eaec111
Fix bit counts in GCForwarding
rkennke Aug 22, 2024
c9e0d07
Merge remote-tracking branch 'origin/master' into JDK-8305895-v4
rkennke Sep 9, 2024
40d327c
Fix metaspace issues post JDK-8338929
tstuefe Sep 2, 2024
9652ea3
GCForwarding init, SerialGC: wrong max heap size used
tstuefe Aug 30, 2024
3aaf07a
Zero should allow LightWeight locking mode
tstuefe Aug 29, 2024
be6f395
Improve comment for CDS precalculating narrow Klass IDs
tstuefe Aug 30, 2024
bf5067e
More fixes post JDK-8338929
tstuefe Sep 2, 2024
a39e5ac
Fix merge error in ClassLoaderMetaspace::deallocate
tstuefe Sep 2, 2024
2224b93
fix merge problem in PSPromotionManager::push_objArray
tstuefe Sep 2, 2024
ecb017b
Fix TestAutoCreateSharedArchiveNoDefaultArchive
stefank Sep 2, 2024
439bbc0
Let CDS print compact headers state
stefank Sep 2, 2024
3f1d0ed
Use FLAG_SET_ERGO when turning off UseCompactObjectHeaders
stefank Sep 2, 2024
88b3709
aarch64: Fix loadNKlassCompactHeaders
xmas92 Sep 3, 2024
2bc8088
x86_64: Fix loadNKlassCompactHeaders
xmas92 Sep 3, 2024
0a10679
Cleanup markWord bits and comments
xmas92 Sep 3, 2024
8671688
Fix jdk/tools/jlink/plugins/CDSPluginTest.java
tstuefe Sep 3, 2024
e00e4f4
Fix runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest…
tstuefe Sep 3, 2024
294c2ce
GC code tweaks
stefank Aug 23, 2024
015f65a
Nit in header_size
stefank Sep 3, 2024
b35d6df
Simplify arrayOopDesc::length_offset_in_bytes and oopDesc::base_offse…
stefank Sep 4, 2024
4912638
Fix compiler/c2/irTests/TestPadding.java for +COH
tstuefe Sep 9, 2024
c5a840d
Fix release build error
tstuefe Sep 2, 2024
70f492d
Try to avoid lea in loadNklass (aarch64)
rkennke Sep 9, 2024
0a9a51b
GCForwarding touch-ups
rkennke Sep 9, 2024
91bc475
Get rid of forward_safe_* methods
rkennke Sep 9, 2024
3b1b6eb
Simplify oopDesc::init_mark()
rkennke Sep 9, 2024
49017fb
Simplify getKlass() in SA
rkennke Sep 9, 2024
33cf12e
Improve initialization of mark-word in CDS ArchiveHeapWriter
rkennke Sep 9, 2024
2884499
Print as warning when UCOH doesn't match in CDS archive
rkennke Sep 9, 2024
696003c
Fix comment
rkennke Sep 10, 2024
e986d19
Rename GCForwarding -> FullGCForwarding; some touch-ups
rkennke Sep 10, 2024
c85c2ed
Improve is_oop()
rkennke Sep 10, 2024
321a44a
Various touch-ups
rkennke Sep 10, 2024
6b27782
Remove asserts in XArrayKlass::oop_oop_iterate()
rkennke Sep 10, 2024
5da250c
More touch-ups, fix Shenandoah oop iterator
rkennke Sep 10, 2024
6abda7b
Fix FullGCForwarding initialization
rkennke Sep 10, 2024
bff4dc1
Re-enable some vectorization tests
rkennke Sep 11, 2024
b6c11f7
Make is_oop() MT-safe
rkennke Sep 11, 2024
9e008ac
Revert accidental change of UCOH default
rkennke Sep 11, 2024
69f1ef1
Hide log timestamps in test to prevent false failures
robcasloz Sep 12, 2024
990926f
Various touch-ups
rkennke Sep 13, 2024
af9adf3
Merge commit '597788850041e7272a23714c05ba546ee6080856' into JDK-8305…
rkennke Sep 16, 2024
d54133a
Fixes post 8338526
tstuefe Sep 11, 2024
78d1a22
remove stray debug output
tstuefe Sep 11, 2024
2f70eb5
Rework compressedklass encoding
tstuefe Sep 12, 2024
c398b05
clarify obscure assert in metasapce setup
tstuefe Sep 13, 2024
a191abc
Fix loop on aarch64
tstuefe Sep 13, 2024
49c8754
Fix test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointer…
tstuefe Sep 13, 2024
2125cd8
Merge remote-tracking branch 'origin/master' into JDK-8305895-v4
rkennke Sep 16, 2024
194d5ab
Merge upstream up to and including 8340184
tstuefe Sep 17, 2024
6a4617b
Fixes post-8340184
tstuefe Sep 17, 2024
28a26ae
fix CompressedClassPointersEncodingScheme yet again for linux aarch64
tstuefe Sep 17, 2024
352e708
Johan review feedback
tstuefe Sep 17, 2024
612d304
CompressedKlassPointers::is_encodable shall be callable with -UseCCP
tstuefe Sep 17, 2024
bb64162
Merge remote-tracking branch 'origin/master' into JDK-8305895-v4
rkennke Sep 18, 2024
9ad2e62
JVMCI support
mur47x111 Sep 18, 2024
b25a4b6
Simplify LIR_Assembler::emit_load_klass()
rkennke Sep 19, 2024
945eb6f
review feedback
tstuefe Sep 19, 2024
0d8a923
Merge remote-tracking branch 'lilliput/JEP-450-temporary-fix-branch-2…
rkennke Sep 19, 2024
2c4a787
Improve matching of loadNKlassCompactHeaders on aarch64
rkennke Sep 20, 2024
cd69da8
Enforce lightweight locking on 32-bit platforms
rkennke Sep 25, 2024
4904d43
Allow LM_MONITOR on 32-bit platforms
rkennke Sep 25, 2024
805a4e0
Improve CollectedHeap::is_oop()
rkennke Sep 26, 2024
d48f55d
@robcasloz review comments
rkennke Sep 26, 2024
059b157
Disable TestSplitPacks::test4a, failing on aarch64
rkennke Sep 27, 2024
f00c899
Disable some vectorization tests that fail with +UCOH and UseSSE<=3
rkennke Oct 2, 2024
d2547b4
Simplify object init code in interpreter
rkennke Oct 2, 2024
aea8f00
Revert "Disable TestSplitPacks::test4a, failing on aarch64"
rkennke Oct 2, 2024
2883e7b
Merge tag 'jdk-24+18' into JDK-8305895-v4
rkennke Oct 4, 2024
119bdc5
Fix for CDSPluginTest.java
rkennke Oct 4, 2024
8742f3c
Merge remote-tracking branch 'rkennke/JDK-8305895-v4' into JDK-830589…
rkennke Oct 4, 2024
572f1ac
@stefank review comments
rkennke Oct 7, 2024
6040108
Remove unused variable
rkennke Oct 7, 2024
1ab2077
Rename nklass/nKlass
rkennke Oct 7, 2024
17f8eb5
Some more review comments/cleanups
rkennke Oct 7, 2024
f65ef5d
Fix header < 16 bytes in indexOf intrinsic, by @sviswa7
rkennke Oct 8, 2024
4d7228e
Rename nklass in x86 code
rkennke Oct 8, 2024
9b1877d
Fix comment
rkennke Oct 8, 2024
17d8367
Rename nklass in aarch64
rkennke Oct 8, 2024
0be2fc4
Re-enable indexOf intrinsic for compact headers
rkennke Oct 8, 2024
d57dbfc
Improve PSParallelCompact::fill_dense_prefix_end() even more
rkennke Oct 8, 2024
4035bb6
Fix include guards
rkennke Oct 8, 2024
b289ef8
Increase compiler code stubs size for indexOf intrinsic
rkennke Oct 8, 2024
6722f8b
PPC64 implementation of Compact Object Headers (JEP 450)
TheRealMDoerr Oct 9, 2024
86f94fe
Merge tag 'jdk-24+19' into JDK-8305895-v4
rkennke Oct 15, 2024
005498b
Fix aarch64.ad
rkennke Oct 15, 2024
1fd365d
Address comments by @vpaprotsk
rkennke Oct 16, 2024
ec42f4d
Problem-list SharedBaseAddress tests on aarch64
rkennke Oct 16, 2024
e4c0878
Remove extra sanity check
rkennke Oct 16, 2024
1b907cc
Compact header riscv (#3)
rkennke Oct 17, 2024
8c4eb6d
Fix needle copying in indexOf intrinsic for smaller headers
rkennke Oct 22, 2024
e324d95
Merge tag 'jdk-24+20' into JDK-8305895-v4
rkennke Oct 22, 2024
19d05e4
Update copyright headers
rkennke Oct 22, 2024
2bbff19
Avoid assert/endless-loop in JFR code
rkennke Oct 22, 2024
1ef6394
Update copyright
rkennke Oct 22, 2024
aadd7b8
Conditionalize platform specific parts of CompressedClassPointersEnco…
rkennke Oct 24, 2024
c2f6d20
s390 port
rkennke Oct 24, 2024
434c681
Enable riscv in CompressedClassPointersEncodingScheme test
rkennke Oct 24, 2024
b945822
Merge tag 'jdk-24+22' into JDK-8305895-v4
rkennke Nov 5, 2024
1ea4de1
Fix gen-ZGC removal
rkennke Nov 6, 2024
4d28224
Merge tag 'jdk-25+23' into JDK-8305895-v4
rkennke Nov 7, 2024
c1a6323
Merge branch 'master' into JDK-8305895-v4
rkennke Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/g1Arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include "gc/g1/g1HeapRegionRemSet.hpp"
#include "gc/g1/g1HeapVerifier.hpp"
#include "gc/shared/cardTable.hpp"
#include "gc/shared/fullGCForwarding.hpp"
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/gcForwarding.hpp"
#include "gc/shared/workerPolicy.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
Expand Down Expand Up @@ -248,7 +248,7 @@ void G1Arguments::initialize() {

void G1Arguments::initialize_heap_flags_and_sizes() {
GCArguments::initialize_heap_flags_and_sizes();
GCForwarding::initialize_flags(heap_reserved_size_bytes());
FullGCForwarding::initialize_flags(heap_reserved_size_bytes());
}

CollectedHeap* G1Arguments::create_heap() {
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
#include "gc/g1/g1YoungGCAllocationFailureInjector.hpp"
#include "gc/shared/classUnloadingContext.hpp"
#include "gc/shared/concurrentGCBreakpoints.hpp"
#include "gc/shared/fullGCForwarding.hpp"
#include "gc/shared/gcBehaviours.hpp"
#include "gc/shared/gcForwarding.hpp"
#include "gc/shared/gcHeapSummary.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/gcTimer.hpp"
Expand Down Expand Up @@ -1435,7 +1435,7 @@ jint G1CollectedHeap::initialize() {

G1InitLogger::print();

GCForwarding::initialize();
FullGCForwarding::initialize();

return JNI_OK;
}
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "gc/g1/g1FullGCCompactionPoint.hpp"
#include "gc/g1/g1FullGCCompactTask.hpp"
#include "gc/g1/g1HeapRegion.inline.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "gc/shared/gcTraceTime.inline.hpp"
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
Expand All @@ -42,7 +42,7 @@ void G1FullGCCompactTask::G1CompactRegionClosure::clear_in_bitmap(oop obj) {

size_t G1FullGCCompactTask::G1CompactRegionClosure::apply(oop obj) {
size_t size = obj->size();
if (GCForwarding::is_forwarded(obj)) {
if (FullGCForwarding::is_forwarded(obj)) {
G1FullGCCompactTask::copy_object_to_new_location(obj);
}

Expand All @@ -53,13 +53,13 @@ size_t G1FullGCCompactTask::G1CompactRegionClosure::apply(oop obj) {
}

void G1FullGCCompactTask::copy_object_to_new_location(oop obj) {
assert(GCForwarding::is_forwarded(obj), "Sanity!");
assert(GCForwarding::forwardee(obj) != obj, "Object must have a new location");
assert(FullGCForwarding::is_forwarded(obj), "Sanity!");
assert(FullGCForwarding::forwardee(obj) != obj, "Object must have a new location");

size_t size = obj->size();
// Copy object and reinit its mark.
HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
HeapWord* destination = cast_from_oop<HeapWord*>(GCForwarding::forwardee(obj));
HeapWord* destination = cast_from_oop<HeapWord*>(FullGCForwarding::forwardee(obj));
Copy::aligned_conjoint_words(obj_addr, destination, size);

// There is no need to transform stack chunks - marking already did that.
Expand Down Expand Up @@ -122,7 +122,7 @@ void G1FullGCCompactTask::compact_humongous_obj(G1HeapRegion* src_hr) {
size_t word_size = obj->size();

uint num_regions = (uint)G1CollectedHeap::humongous_obj_size_in_regions(word_size);
HeapWord* destination = cast_from_oop<HeapWord*>(GCForwarding::forwardee(obj));
HeapWord* destination = cast_from_oop<HeapWord*>(FullGCForwarding::forwardee(obj));

assert(collector()->mark_bitmap()->is_marked(obj), "Should only compact marked objects");
collector()->mark_bitmap()->clear(obj);
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "gc/g1/g1FullCollector.inline.hpp"
#include "gc/g1/g1FullGCCompactionPoint.hpp"
#include "gc/g1/g1HeapRegion.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "gc/shared/preservedMarks.inline.hpp"
#include "oops/oop.inline.hpp"
#include "utilities/debug.hpp"
Expand Down Expand Up @@ -107,10 +107,10 @@ void G1FullGCCompactionPoint::forward(oop object, size_t size) {
if (!object->is_forwarded()) {
preserved_stack()->push_if_necessary(object, object->mark());
}
GCForwarding::forward_to(object, cast_to_oop(_compaction_top));
assert(GCForwarding::is_forwarded(object), "must be forwarded");
FullGCForwarding::forward_to(object, cast_to_oop(_compaction_top));
assert(FullGCForwarding::is_forwarded(object), "must be forwarded");
} else {
assert(!GCForwarding::is_forwarded(object), "must not be forwarded");
assert(!FullGCForwarding::is_forwarded(object), "must not be forwarded");
}

// Update compaction values.
Expand Down Expand Up @@ -173,8 +173,8 @@ void G1FullGCCompactionPoint::forward_humongous(G1HeapRegion* hr) {
preserved_stack()->push_if_necessary(obj, obj->mark());

G1HeapRegion* dest_hr = _compaction_regions->at(range_begin);
GCForwarding::forward_to(obj, cast_to_oop(dest_hr->bottom()));
assert(GCForwarding::is_forwarded(obj), "Object must be forwarded!");
FullGCForwarding::forward_to(obj, cast_to_oop(dest_hr->bottom()));
assert(FullGCForwarding::is_forwarded(obj), "Object must be forwarded!");

// Add the humongous object regions to the compaction point.
add_humongous(hr);
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "gc/g1/g1FullCollector.inline.hpp"
#include "gc/g1/g1FullGCMarker.inline.hpp"
#include "gc/g1/g1HeapRegionRemSet.inline.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "memory/iterator.inline.hpp"
#include "memory/universe.hpp"
#include "oops/access.inline.hpp"
Expand Down Expand Up @@ -66,8 +66,8 @@ template <class T> inline void G1AdjustClosure::adjust_pointer(T* p) {
return;
}

if (GCForwarding::is_forwarded(obj)) {
oop forwardee = GCForwarding::forwardee(obj);
if (FullGCForwarding::is_forwarded(obj)) {
oop forwardee = FullGCForwarding::forwardee(obj);
// Forwarded, just update.
assert(G1CollectedHeap::heap()->is_in_reserved(forwardee), "should be in object space");
RawAccess<IS_NOT_NULL>::oop_store(p, forwardee);
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/g1/g1FullGCPrepareTask.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "gc/g1/g1FullGCCompactionPoint.hpp"
#include "gc/g1/g1FullGCScope.hpp"
#include "gc/g1/g1HeapRegion.inline.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"

void G1DetermineCompactionQueueClosure::free_empty_humongous_region(G1HeapRegion* hr) {
_g1h->free_humongous_region(hr, nullptr);
Expand Down Expand Up @@ -115,10 +115,10 @@ inline bool G1DetermineCompactionQueueClosure::do_heap_region(G1HeapRegion* hr)
}

inline size_t G1SerialRePrepareClosure::apply(oop obj) {
if (GCForwarding::is_forwarded(obj)) {
if (FullGCForwarding::is_forwarded(obj)) {
// We skip objects compiled into the first region or
// into regions not part of the serial compaction point.
if (cast_from_oop<HeapWord*>(GCForwarding::forwardee(obj)) < _dense_prefix_top) {
if (cast_from_oop<HeapWord*>(FullGCForwarding::forwardee(obj)) < _dense_prefix_top) {
return obj->size();
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,12 @@ oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const regio
assert(region_attr.is_in_cset(),
"Unexpected region attr type: %s", region_attr.get_type_str());

// NOTE: With compact headers, it is not safe to load the Klass* from o, because
// that would access the mark-word, and the mark-word might change at any time by
// concurrent promotion. The promoted mark-word would point to the forwardee, which
// may not yet have completed copying. Therefore we must load the Klass* from
// the mark-word that we have already loaded. This is safe, because we have checked
// that this is not yet forwarded in the caller.
// NOTE: With compact headers, it is not safe to load the Klass* from old, because
// that would access the mark-word, that might change at any time by concurrent
// workers.
// This mark word would refer to a forwardee, which may not yet have completed
// copying. Therefore we must load the Klass* from the mark-word that we already
// loaded. This is safe, because we only enter here if not yet forwarded.
assert(!old_mark.is_forwarded(), "precondition");
Klass* klass = UseCompactObjectHeaders
? old_mark.klass()
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/parallel/mutableSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void MutableSpace::object_iterate(ObjectClosure* cl) {
// so we can encounter objects with "forwarded" markword.
// They are essentially dead, so skipping them
if (obj->is_forwarded()) {
assert(obj->forwardee() != obj, "must not be self-forwarded");
assert(!obj->is_self_forwarded(), "must not be self-forwarded");
// It is safe to use the forwardee here. Parallel GC only uses
// header-based forwarding during promotion. Full GC doesn't
// use the object header for forwarding at all.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/parallel/parallelArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "gc/parallel/parallelArguments.hpp"
#include "gc/parallel/parallelScavengeHeap.hpp"
#include "gc/shared/adaptiveSizePolicy.hpp"
#include "gc/shared/fullGCForwarding.hpp"
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/gcForwarding.hpp"
#include "gc/shared/genArguments.hpp"
#include "gc/shared/workerPolicy.hpp"
#include "logging/log.hpp"
Expand Down Expand Up @@ -128,7 +128,7 @@ void ParallelArguments::initialize_heap_flags_and_sizes() {
// Redo everything from the start
initialize_heap_flags_and_sizes_one_pass();
}
GCForwarding::initialize_flags(heap_reserved_size_bytes());
FullGCForwarding::initialize_flags(heap_reserved_size_bytes());
}

size_t ParallelArguments::heap_reserved_size_bytes() {
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "gc/parallel/psPromotionManager.hpp"
#include "gc/parallel/psScavenge.hpp"
#include "gc/parallel/psVMOperations.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "gc/shared/gcHeapSummary.hpp"
#include "gc/shared/gcLocker.inline.hpp"
#include "gc/shared/gcWhen.hpp"
Expand Down Expand Up @@ -130,7 +130,7 @@ jint ParallelScavengeHeap::initialize() {

ParallelInitLogger::print();

GCForwarding::initialize();
FullGCForwarding::initialize();

return JNI_OK;
}
Expand Down
10 changes: 5 additions & 5 deletions src/hotspot/share/gc/parallel/psParallelCompact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
#include "gc/parallel/psStringDedup.hpp"
#include "gc/parallel/psYoungGen.hpp"
#include "gc/shared/classUnloadingContext.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "gc/shared/gcCause.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/gcHeapSummary.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/gcLocker.hpp"
Expand Down Expand Up @@ -1597,7 +1597,7 @@ void PSParallelCompact::forward_to_new_addr() {
oop obj = cast_to_oop(cur_addr);
if (new_addr != cur_addr) {
cm->preserved_marks()->push_if_necessary(obj, obj->mark());
GCForwarding::forward_to(obj, cast_to_oop(new_addr));
FullGCForwarding::forward_to(obj, cast_to_oop(new_addr));
}
size_t obj_size = obj->size();
live_words += obj_size;
Expand Down Expand Up @@ -1640,7 +1640,7 @@ void PSParallelCompact::verify_forward() {
}
oop obj = cast_to_oop(cur_addr);
if (cur_addr != bump_ptr) {
assert(GCForwarding::forwardee(obj) == cast_to_oop(bump_ptr), "inv");
assert(FullGCForwarding::forwardee(obj) == cast_to_oop(bump_ptr), "inv");
}
bump_ptr += obj->size();
cur_addr += obj->size();
Expand Down Expand Up @@ -2403,8 +2403,8 @@ void MoveAndUpdateClosure::do_addr(HeapWord* addr, size_t words) {
if (copy_destination() != source()) {
DEBUG_ONLY(PSParallelCompact::check_new_location(source(), destination());)
assert(source() != destination(), "inv");
assert(GCForwarding::is_forwarded(cast_to_oop(source())), "inv");
assert(GCForwarding::forwardee(cast_to_oop(source())) == cast_to_oop(destination()), "inv");
assert(FullGCForwarding::is_forwarded(cast_to_oop(source())), "inv");
assert(FullGCForwarding::forwardee(cast_to_oop(source())) == cast_to_oop(destination()), "inv");
Copy::aligned_conjoint_words(source(), copy_destination(), words);
cast_to_oop(copy_destination())->init_mark();
}
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "gc/parallel/parMarkBitMap.inline.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/continuationGCSupport.inline.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "oops/access.inline.hpp"
#include "oops/compressedOops.inline.hpp"
#include "oops/klass.hpp"
Expand Down Expand Up @@ -80,7 +80,7 @@ inline void PSParallelCompact::adjust_pointer(T* p) {
if (!obj->is_forwarded()) {
return;
}
oop new_obj = GCForwarding::forwardee(obj);
oop new_obj = FullGCForwarding::forwardee(obj);
assert(new_obj != nullptr, "non-null address for live objects");
assert(new_obj != obj, "inv");
assert(ParallelScavengeHeap::heap()->is_in_reserved(new_obj),
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ inline oop PSPromotionManager::copy_unmarked_to_survivor_space(oop o,
oop new_obj = nullptr;
bool new_obj_is_tenured = false;

// NOTE: With compact headers, it is not safe to load the Klass* from o, because
// that would access the mark-word, and the mark-word might change at any time by
// concurrent promotion. The promoted mark-word would point to the forwardee, which
// may not yet have completed copying. Therefore we must load the Klass* from
// the mark-word that we have already loaded. This is safe, because we have checked
// that this is not yet forwarded in the caller.)
// NOTE: With compact headers, it is not safe to load the Klass* from old, because
// that would access the mark-word, that might change at any time by concurrent
// workers.
// This mark word would refer to a forwardee, which may not yet have completed
// copying. Therefore we must load the Klass* from the mark-word that we already
// loaded. This is safe, because we only enter here if not yet forwarded.
assert(!test_mark.is_forwarded(), "precondition");
Klass* klass = UseCompactObjectHeaders
? test_mark.klass()
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/serial/serialArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
*/

#include "precompiled.hpp"
#include "gc/shared/gcForwarding.hpp"
#include "gc/shared/fullGCForwarding.hpp"
#include "gc/shared/genArguments.hpp"
#include "gc/serial/serialArguments.hpp"
#include "gc/serial/serialHeap.hpp"

void SerialArguments::initialize_heap_flags_and_sizes() {
GenArguments::initialize_heap_flags_and_sizes();
GCForwarding::initialize_flags(MaxHeapSize);
FullGCForwarding::initialize_flags(MaxHeapSize);
}

CollectedHeap* SerialArguments::create_heap() {
Expand Down
14 changes: 7 additions & 7 deletions src/hotspot/share/gc/serial/serialFullGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "gc/shared/classUnloadingContext.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "gc/shared/continuationGCSupport.inline.hpp"
#include "gc/shared/gcForwarding.inline.hpp"
#include "gc/shared/fullGCForwarding.inline.hpp"
#include "gc/shared/gcHeapSummary.hpp"
#include "gc/shared/gcTimer.hpp"
#include "gc/shared/gcTrace.hpp"
Expand Down Expand Up @@ -231,7 +231,7 @@ class Compacter {
static void forward_obj(oop obj, HeapWord* new_addr) {
prefetch_write_scan(obj);
if (cast_from_oop<HeapWord*>(obj) != new_addr) {
GCForwarding::forward_to(obj, cast_to_oop(new_addr));
FullGCForwarding::forward_to(obj, cast_to_oop(new_addr));
} else {
assert(obj->is_gc_marked(), "inv");
// This obj will stay in-place. Fix the markword.
Expand All @@ -256,7 +256,7 @@ class Compacter {
prefetch_read_scan(addr);

oop obj = cast_to_oop(addr);
oop new_obj = GCForwarding::forwardee(obj);
oop new_obj = FullGCForwarding::forwardee(obj);
HeapWord* new_addr = cast_from_oop<HeapWord*>(new_obj);
assert(addr != new_addr, "inv");
prefetch_write_copy(new_addr);
Expand Down Expand Up @@ -353,13 +353,13 @@ class Compacter {
HeapWord* top = space->top();

// Check if the first obj inside this space is forwarded.
if (!GCForwarding::is_forwarded(cast_to_oop(cur_addr))) {
if (!FullGCForwarding::is_forwarded(cast_to_oop(cur_addr))) {
// Jump over consecutive (in-place) live-objs-chunk
cur_addr = get_first_dead(i);
}

while (cur_addr < top) {
if (!GCForwarding::is_forwarded(cast_to_oop(cur_addr))) {
if (!FullGCForwarding::is_forwarded(cast_to_oop(cur_addr))) {
cur_addr = *(HeapWord**) cur_addr;
continue;
}
Expand Down Expand Up @@ -625,8 +625,8 @@ template <class T> void SerialFullGC::adjust_pointer(T* p) {
oop obj = CompressedOops::decode_not_null(heap_oop);
assert(Universe::heap()->is_in(obj), "should be in heap");

if (GCForwarding::is_forwarded(obj)) {
oop new_obj = GCForwarding::forwardee(obj);
if (FullGCForwarding::is_forwarded(obj)) {
oop new_obj = FullGCForwarding::forwardee(obj);
assert(is_object_aligned(new_obj), "oop must be aligned");
RawAccess<IS_NOT_NULL>::oop_store(p, new_obj);
}
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/serial/serialHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "gc/shared/collectedHeap.inline.hpp"
#include "gc/shared/collectorCounters.hpp"
#include "gc/shared/continuationGCSupport.inline.hpp"
#include "gc/shared/gcForwarding.hpp"
#include "gc/shared/fullGCForwarding.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/gcInitLogger.hpp"
#include "gc/shared/gcLocker.inline.hpp"
Expand Down Expand Up @@ -201,7 +201,7 @@ jint SerialHeap::initialize() {

GCInitLogger::print();

GCForwarding::initialize();
FullGCForwarding::initialize();

return JNI_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/c2/barrierSetC2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ int BarrierSetC2::arraycopy_payload_base_offset(bool is_array) {
int base_off = is_array ? arrayOopDesc::length_offset_in_bytes() :
instanceOopDesc::base_offset_in_bytes();
// base_off:
// 8 - 32-bit VM
// 8 - 32-bit VM or 64-bit VM, compact headers
// 12 - 64-bit VM, compressed klass
// 16 - 64-bit VM, normal klass
if (base_off % BytesPerLong != 0) {
Expand Down
Loading