mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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) {
|
int format) {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
|
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
|
#endif
|
||||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||||
|
|
|
@ -669,7 +669,7 @@ void emit_d32_reloc(CodeBuffer& cbuf, int d32, RelocationHolder const& rspec, in
|
||||||
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||||
d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
|
d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
|
||||||
assert(Universe::heap()->is_in_reserved((address)(intptr_t)d32), "should be real oop");
|
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
|
#endif
|
||||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
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 &&
|
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||||
d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
|
d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
|
||||||
assert(Universe::heap()->is_in_reserved((address)d64), "should be real oop");
|
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");
|
"cannot embed scavengable oops in code");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -207,7 +207,7 @@ void ciObject::init_flags_from(oop x) {
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
if (x != NULL) {
|
if (x != NULL) {
|
||||||
assert(Universe::heap()->is_in_reserved(x), "must be");
|
assert(Universe::heap()->is_in_reserved(x), "must be");
|
||||||
if (x->is_scavengable())
|
if (Universe::heap()->is_scavengable(x))
|
||||||
flags |= SCAVENGABLE_FLAG;
|
flags |= SCAVENGABLE_FLAG;
|
||||||
}
|
}
|
||||||
_ident |= flags;
|
_ident |= flags;
|
||||||
|
|
|
@ -1683,7 +1683,7 @@ public:
|
||||||
{ NOT_PRODUCT(_print_nm = NULL); }
|
{ NOT_PRODUCT(_print_nm = NULL); }
|
||||||
bool detected_scavenge_root() { return _detected_scavenge_root; }
|
bool detected_scavenge_root() { return _detected_scavenge_root; }
|
||||||
virtual void do_oop(oop* p) {
|
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));
|
NOT_PRODUCT(maybe_print(p));
|
||||||
_detected_scavenge_root = true;
|
_detected_scavenge_root = true;
|
||||||
}
|
}
|
||||||
|
@ -2178,7 +2178,7 @@ public:
|
||||||
DebugScavengeRoot(nmethod* nm) : _nm(nm), _ok(true) { }
|
DebugScavengeRoot(nmethod* nm) : _nm(nm), _ok(true) { }
|
||||||
bool ok() { return _ok; }
|
bool ok() { return _ok; }
|
||||||
virtual void do_oop(oop* p) {
|
virtual void do_oop(oop* p) {
|
||||||
if ((*p) == NULL || !(*p)->is_scavengable()) return;
|
if ((*p) == NULL || !Universe::heap()->is_scavengable(*p)) return;
|
||||||
if (_ok) {
|
if (_ok) {
|
||||||
_nm->print_nmethod(true);
|
_nm->print_nmethod(true);
|
||||||
_ok = false;
|
_ok = false;
|
||||||
|
|
|
@ -284,8 +284,6 @@ class oopDesc {
|
||||||
// garbage collection
|
// garbage collection
|
||||||
inline bool is_gc_marked() const;
|
inline bool is_gc_marked() const;
|
||||||
|
|
||||||
inline bool is_scavengable() const;
|
|
||||||
|
|
||||||
// Forward pointer operations for scavenge
|
// Forward pointer operations for scavenge
|
||||||
inline bool is_forwarded() const;
|
inline bool is_forwarded() const;
|
||||||
|
|
||||||
|
|
|
@ -363,10 +363,6 @@ bool oopDesc::is_gc_marked() const {
|
||||||
return mark()->is_marked();
|
return mark()->is_marked();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool oopDesc::is_scavengable() const {
|
|
||||||
return Universe::heap()->is_scavengable(oop(const_cast<oopDesc*>(this)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Used by scavengers
|
// Used by scavengers
|
||||||
bool oopDesc::is_forwarded() const {
|
bool oopDesc::is_forwarded() const {
|
||||||
// The extra heap check is needed since the obj might be locked, in which case the
|
// 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