mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 20:44:41 +02:00
7041789: 30% perf regression with c2/arm following 7017732
Implement a more accurate is_scavengable() Reviewed-by: stefank, jcoomes, ysr
This commit is contained in:
parent
8cdd97938c
commit
6819e3739e
12 changed files with 132 additions and 36 deletions
|
@ -1810,7 +1810,7 @@ public:
|
|||
void maybe_print(oop* p) {
|
||||
if (_print_nm == NULL) return;
|
||||
if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root");
|
||||
tty->print_cr(""PTR_FORMAT"[offset=%d] detected non-perm oop "PTR_FORMAT" (found at "PTR_FORMAT")",
|
||||
tty->print_cr(""PTR_FORMAT"[offset=%d] detected scavengable oop "PTR_FORMAT" (found at "PTR_FORMAT")",
|
||||
_print_nm, (int)((intptr_t)p - (intptr_t)_print_nm),
|
||||
(intptr_t)(*p), (intptr_t)p);
|
||||
(*p)->print();
|
||||
|
@ -2311,7 +2311,7 @@ public:
|
|||
_nm->print_nmethod(true);
|
||||
_ok = false;
|
||||
}
|
||||
tty->print_cr("*** non-perm oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)",
|
||||
tty->print_cr("*** scavengable oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)",
|
||||
(intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm));
|
||||
(*p)->print();
|
||||
}
|
||||
|
@ -2324,7 +2324,7 @@ void nmethod::verify_scavenge_root_oops() {
|
|||
DebugScavengeRoot debug_scavenge_root(this);
|
||||
oops_do(&debug_scavenge_root);
|
||||
if (!debug_scavenge_root.ok())
|
||||
fatal("found an unadvertised bad non-perm oop in the code cache");
|
||||
fatal("found an unadvertised bad scavengable oop in the code cache");
|
||||
}
|
||||
assert(scavenge_root_not_marked(), "");
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ class xmlStream;
|
|||
class nmethod : public CodeBlob {
|
||||
friend class VMStructs;
|
||||
friend class NMethodSweeper;
|
||||
friend class CodeCache; // non-perm oops
|
||||
friend class CodeCache; // scavengable oops
|
||||
private:
|
||||
// Shared fields for all nmethod's
|
||||
methodOop _method;
|
||||
|
@ -466,17 +466,17 @@ public:
|
|||
bool is_at_poll_return(address pc);
|
||||
bool is_at_poll_or_poll_return(address pc);
|
||||
|
||||
// Non-perm oop support
|
||||
// Scavengable oop support
|
||||
bool on_scavenge_root_list() const { return (_scavenge_root_state & 1) != 0; }
|
||||
protected:
|
||||
enum { npl_on_list = 0x01, npl_marked = 0x10 };
|
||||
void set_on_scavenge_root_list() { _scavenge_root_state = npl_on_list; }
|
||||
enum { sl_on_list = 0x01, sl_marked = 0x10 };
|
||||
void set_on_scavenge_root_list() { _scavenge_root_state = sl_on_list; }
|
||||
void clear_on_scavenge_root_list() { _scavenge_root_state = 0; }
|
||||
// assertion-checking and pruning logic uses the bits of _scavenge_root_state
|
||||
#ifndef PRODUCT
|
||||
void set_scavenge_root_marked() { _scavenge_root_state |= npl_marked; }
|
||||
void clear_scavenge_root_marked() { _scavenge_root_state &= ~npl_marked; }
|
||||
bool scavenge_root_not_marked() { return (_scavenge_root_state &~ npl_on_list) == 0; }
|
||||
void set_scavenge_root_marked() { _scavenge_root_state |= sl_marked; }
|
||||
void clear_scavenge_root_marked() { _scavenge_root_state &= ~sl_marked; }
|
||||
bool scavenge_root_not_marked() { return (_scavenge_root_state &~ sl_on_list) == 0; }
|
||||
// N.B. there is no positive marked query, and we only use the not_marked query for asserts.
|
||||
#endif //PRODUCT
|
||||
nmethod* scavenge_root_link() const { return _scavenge_root_link; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue