mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8199728: Remove oopDesc::is_scavengable
Reviewed-by: kbarrett, pliden
This commit is contained in:
parent
089f83703a
commit
0933677217
6 changed files with 8 additions and 14 deletions
|
@ -391,7 +391,7 @@ void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
|
|||
int format) {
|
||||
#ifdef ASSERT
|
||||
if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
|
||||
assert(oopDesc::is_oop(cast_to_oop(d32)) && (ScavengeRootsInCode || !cast_to_oop(d32)->is_scavengable()), "cannot embed scavengable oops in code");
|
||||
assert(oopDesc::is_oop(cast_to_oop(d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d32))), "cannot embed scavengable oops in code");
|
||||
}
|
||||
#endif
|
||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||
|
@ -786,7 +786,7 @@ static int impl_x_helper( CodeBuffer *cbuf, bool do_size, bool is_load,
|
|||
}
|
||||
if (cbuf) {
|
||||
MacroAssembler _masm(cbuf);
|
||||
// EVEX spills remain EVEX: Compressed displacemement is better than AVX on spill mem operations,
|
||||
// EVEX spills remain EVEX: Compressed displacemement is better than AVX on spill mem operations,
|
||||
// it maps more cases to single byte displacement
|
||||
_masm.set_managed();
|
||||
if (reg_lo+1 == reg_hi) { // double move?
|
||||
|
@ -976,7 +976,7 @@ static int vec_stack_to_stack_helper(CodeBuffer *cbuf, bool do_size, int src_off
|
|||
dst_offset_size = (tmp_dst_offset == 0) ? 0 : ((tmp_dst_offset < 0x80) ? 1 : 4);
|
||||
calc_size += 3+src_offset_size + 3+dst_offset_size;
|
||||
break;
|
||||
}
|
||||
}
|
||||
case Op_VecX:
|
||||
case Op_VecY:
|
||||
case Op_VecZ:
|
||||
|
|
|
@ -669,7 +669,7 @@ void emit_d32_reloc(CodeBuffer& cbuf, int d32, RelocationHolder const& rspec, in
|
|||
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||
d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
|
||||
assert(Universe::heap()->is_in_reserved((address)(intptr_t)d32), "should be real oop");
|
||||
assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)) && (ScavengeRootsInCode || !cast_to_oop((intptr_t)d32)->is_scavengable()), "cannot embed scavengable oops in code");
|
||||
assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop((intptr_t)d32))), "cannot embed scavengable oops in code");
|
||||
}
|
||||
#endif
|
||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||
|
@ -696,7 +696,7 @@ void emit_d64_reloc(CodeBuffer& cbuf, int64_t d64, RelocationHolder const& rspec
|
|||
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||
d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
|
||||
assert(Universe::heap()->is_in_reserved((address)d64), "should be real oop");
|
||||
assert(oopDesc::is_oop(cast_to_oop(d64)) && (ScavengeRootsInCode || !cast_to_oop(d64)->is_scavengable()),
|
||||
assert(oopDesc::is_oop(cast_to_oop(d64)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d64))),
|
||||
"cannot embed scavengable oops in code");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -207,7 +207,7 @@ void ciObject::init_flags_from(oop x) {
|
|||
int flags = 0;
|
||||
if (x != NULL) {
|
||||
assert(Universe::heap()->is_in_reserved(x), "must be");
|
||||
if (x->is_scavengable())
|
||||
if (Universe::heap()->is_scavengable(x))
|
||||
flags |= SCAVENGABLE_FLAG;
|
||||
}
|
||||
_ident |= flags;
|
||||
|
|
|
@ -1683,7 +1683,7 @@ public:
|
|||
{ NOT_PRODUCT(_print_nm = NULL); }
|
||||
bool detected_scavenge_root() { return _detected_scavenge_root; }
|
||||
virtual void do_oop(oop* p) {
|
||||
if ((*p) != NULL && (*p)->is_scavengable()) {
|
||||
if ((*p) != NULL && Universe::heap()->is_scavengable(*p)) {
|
||||
NOT_PRODUCT(maybe_print(p));
|
||||
_detected_scavenge_root = true;
|
||||
}
|
||||
|
@ -2178,7 +2178,7 @@ public:
|
|||
DebugScavengeRoot(nmethod* nm) : _nm(nm), _ok(true) { }
|
||||
bool ok() { return _ok; }
|
||||
virtual void do_oop(oop* p) {
|
||||
if ((*p) == NULL || !(*p)->is_scavengable()) return;
|
||||
if ((*p) == NULL || !Universe::heap()->is_scavengable(*p)) return;
|
||||
if (_ok) {
|
||||
_nm->print_nmethod(true);
|
||||
_ok = false;
|
||||
|
|
|
@ -284,8 +284,6 @@ class oopDesc {
|
|||
// garbage collection
|
||||
inline bool is_gc_marked() const;
|
||||
|
||||
inline bool is_scavengable() const;
|
||||
|
||||
// Forward pointer operations for scavenge
|
||||
inline bool is_forwarded() const;
|
||||
|
||||
|
|
|
@ -363,10 +363,6 @@ bool oopDesc::is_gc_marked() const {
|
|||
return mark()->is_marked();
|
||||
}
|
||||
|
||||
bool oopDesc::is_scavengable() const {
|
||||
return Universe::heap()->is_scavengable(oop(const_cast<oopDesc*>(this)));
|
||||
}
|
||||
|
||||
// Used by scavengers
|
||||
bool oopDesc::is_forwarded() const {
|
||||
// The extra heap check is needed since the obj might be locked, in which case the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue