Skip to content

Commit e63b90c

Browse files
Aditya Mandaleekashipilev
authored andcommitted
8251358: Clean up Access configuration after Shenandoah barrier change
Reviewed-by: eosterlund, rkennke, shade
1 parent 9c17a35 commit e63b90c

38 files changed

+110
-202
lines changed

src/hotspot/share/classfile/javaClasses.inline.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void java_lang_ref_Reference::set_referent_raw(oop ref, oop value) {
113113
}
114114

115115
HeapWord* java_lang_ref_Reference::referent_addr_raw(oop ref) {
116-
return ref->obj_field_addr_raw<HeapWord>(_referent_offset);
116+
return ref->obj_field_addr<HeapWord>(_referent_offset);
117117
}
118118

119119
oop java_lang_ref_Reference::next(oop ref) {
@@ -129,7 +129,7 @@ void java_lang_ref_Reference::set_next_raw(oop ref, oop value) {
129129
}
130130

131131
HeapWord* java_lang_ref_Reference::next_addr_raw(oop ref) {
132-
return ref->obj_field_addr_raw<HeapWord>(_next_offset);
132+
return ref->obj_field_addr<HeapWord>(_next_offset);
133133
}
134134

135135
oop java_lang_ref_Reference::discovered(oop ref) {
@@ -145,7 +145,7 @@ void java_lang_ref_Reference::set_discovered_raw(oop ref, oop value) {
145145
}
146146

147147
HeapWord* java_lang_ref_Reference::discovered_addr_raw(oop ref) {
148-
return ref->obj_field_addr_raw<HeapWord>(_discovered_offset);
148+
return ref->obj_field_addr<HeapWord>(_discovered_offset);
149149
}
150150

151151
bool java_lang_ref_Reference::is_final(oop ref) {

src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class G1ResetHumongousClosure : public HeapRegionClosure {
4848
if (_bitmap->is_marked(obj)) {
4949
// Clear bitmap and fix mark word.
5050
_bitmap->clear(obj);
51-
obj->init_mark_raw();
51+
obj->init_mark();
5252
} else {
5353
assert(current->is_empty(), "Should have been cleared in phase 2.");
5454
}
@@ -71,7 +71,7 @@ size_t G1FullGCCompactTask::G1CompactRegionClosure::apply(oop obj) {
7171
HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
7272
assert(obj_addr != destination, "everything in this pass should be moving");
7373
Copy::aligned_conjoint_words(obj_addr, destination, size);
74-
oop(destination)->init_mark_raw();
74+
oop(destination)->init_mark();
7575
assert(oop(destination)->klass() != NULL, "should have a class");
7676

7777
return size;

src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ void G1FullGCCompactionPoint::forward(oop object, size_t size) {
112112
// with BiasedLocking, in this case forwardee() will return NULL
113113
// even if the mark-word is used. This is no problem since
114114
// forwardee() will return NULL in the compaction phase as well.
115-
object->init_mark_raw();
115+
object->init_mark();
116116
} else {
117117
// Make sure object has the correct mark-word set or that it will be
118118
// fixed when restoring the preserved marks.
119-
assert(object->mark_raw() == markWord::prototype_for_klass(object->klass()) || // Correct mark
119+
assert(object->mark() == markWord::prototype_for_klass(object->klass()) || // Correct mark
120120
object->mark_must_be_preserved() || // Will be restored by PreservedMarksSet
121-
(UseBiasedLocking && object->has_bias_pattern_raw()), // Will be restored by BiasedLocking
121+
(UseBiasedLocking && object->has_bias_pattern()), // Will be restored by BiasedLocking
122122
"should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
123-
p2i(object), object->mark_raw().value(), markWord::prototype_for_klass(object->klass()).value());
123+
p2i(object), object->mark().value(), markWord::prototype_for_klass(object->klass()).value());
124124
}
125125
assert(object->forwardee() == NULL, "should be forwarded to NULL");
126126
}

src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ inline bool G1FullGCMarker::mark_object(oop obj) {
5050
}
5151

5252
// Marked by us, preserve if needed.
53-
markWord mark = obj->mark_raw();
53+
markWord mark = obj->mark();
5454
if (obj->mark_must_be_preserved(mark) &&
5555
!G1ArchiveAllocator::is_open_archive_object(obj)) {
5656
preserved_stack()->push(obj, mark);

src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ template <class T> inline void G1AdjustClosure::adjust_pointer(T* p) {
7777
oop forwardee = obj->forwardee();
7878
if (forwardee == NULL) {
7979
// Not forwarded, return current reference.
80-
assert(obj->mark_raw() == markWord::prototype_for_klass(obj->klass()) || // Correct mark
80+
assert(obj->mark() == markWord::prototype_for_klass(obj->klass()) || // Correct mark
8181
obj->mark_must_be_preserved() || // Will be restored by PreservedMarksSet
82-
(UseBiasedLocking && obj->has_bias_pattern_raw()), // Will be restored by BiasedLocking
82+
(UseBiasedLocking && obj->has_bias_pattern()), // Will be restored by BiasedLocking
8383
"Must have correct prototype or be preserved, obj: " PTR_FORMAT ", mark: " PTR_FORMAT ", prototype: " PTR_FORMAT,
84-
p2i(obj), obj->mark_raw().value(), markWord::prototype_for_klass(obj->klass()).value());
84+
p2i(obj), obj->mark().value(), markWord::prototype_for_klass(obj->klass()).value());
8585
return;
8686
}
8787

src/hotspot/share/gc/g1/g1OopClosures.inline.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ inline void G1ScanClosureBase::prefetch_and_push(T* p, const oop obj) {
4747
// stall. We'll try to prefetch the object (for write, given that
4848
// we might need to install the forwarding reference) and we'll
4949
// get back to it when pop it from the queue
50-
Prefetch::write(obj->mark_addr_raw(), 0);
51-
Prefetch::read(obj->mark_addr_raw(), (HeapWordSize*2));
50+
Prefetch::write(obj->mark_addr(), 0);
51+
Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
5252

5353
// slightly paranoid test; I'm trying to catch potential
5454
// problems before we go into push_on_queue to know where the
@@ -231,7 +231,7 @@ void G1ParCopyClosure<barrier, do_mark_object>::do_oop_work(T* p) {
231231
const G1HeapRegionAttr state = _g1h->region_attr(obj);
232232
if (state.is_in_cset()) {
233233
oop forwardee;
234-
markWord m = obj->mark_raw();
234+
markWord m = obj->mark();
235235
if (m.is_marked()) {
236236
forwardee = (oop) m.decode_pointer();
237237
} else {

src/hotspot/share/gc/g1/g1ParScanThreadState.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void G1ParScanThreadState::do_oop_evac(T* p) {
193193
return;
194194
}
195195

196-
markWord m = obj->mark_raw();
196+
markWord m = obj->mark();
197197
if (m.is_marked()) {
198198
obj = (oop) m.decode_pointer();
199199
} else {
@@ -485,15 +485,15 @@ oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const regio
485485
// In this case, we have to install the mark word first,
486486
// otherwise obj looks to be forwarded (the old mark word,
487487
// which contains the forward pointer, was copied)
488-
obj->set_mark_raw(old_mark);
488+
obj->set_mark(old_mark);
489489
markWord new_mark = old_mark.displaced_mark_helper().set_age(age);
490490
old_mark.set_displaced_mark_helper(new_mark);
491491
} else {
492-
obj->set_mark_raw(old_mark.set_age(age));
492+
obj->set_mark(old_mark.set_age(age));
493493
}
494494
_age_table.add(age, word_sz);
495495
} else {
496-
obj->set_mark_raw(old_mark);
496+
obj->set_mark(old_mark);
497497
}
498498

499499
// Most objects are not arrays, so do one array check rather than

src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ inline void follow_array_specialized(objArrayOop obj, int index, ParCompactionMa
133133

134134
const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
135135
const size_t end_index = beg_index + stride;
136-
T* const base = (T*)obj->base_raw();
136+
T* const base = (T*)obj->base();
137137
T* const beg = base + beg_index;
138138
T* const end = base + end_index;
139139

src/hotspot/share/gc/parallel/psPromotionLAB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void PSPromotionLAB::flush() {
8383
// so they can always fill with an array.
8484
HeapWord* tlab_end = end() + filler_header_size;
8585
typeArrayOop filler_oop = (typeArrayOop) top();
86-
filler_oop->set_mark_raw(markWord::prototype());
86+
filler_oop->set_mark(markWord::prototype());
8787
filler_oop->set_klass(Universe::intArrayKlassObj());
8888
const size_t array_length =
8989
pointer_delta(tlab_end, top()) - typeArrayOopDesc::header_size(T_INT);

src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ inline void PSPromotionManager::claim_or_forward_depth(T* p) {
5353
assert(should_scavenge(p, true), "revisiting object?");
5454
assert(ParallelScavengeHeap::heap()->is_in(p), "pointer outside heap");
5555
oop obj = RawAccess<IS_NOT_NULL>::oop_load(p);
56-
Prefetch::write(obj->mark_addr_raw(), 0);
56+
Prefetch::write(obj->mark_addr(), 0);
5757
push_depth(ScannerTask(p));
5858
}
5959

@@ -141,7 +141,7 @@ inline oop PSPromotionManager::copy_to_survivor_space(oop o) {
141141
// NOTE! We must be very careful with any methods that access the mark
142142
// in o. There may be multiple threads racing on it, and it may be forwarded
143143
// at any time. Do not use oop methods for accessing the mark!
144-
markWord test_mark = o->mark_raw();
144+
markWord test_mark = o->mark();
145145

146146
// The same test as "o->is_forwarded()"
147147
if (!test_mark.is_marked()) {

0 commit comments

Comments
 (0)