6950075: nmethod sweeper should operate concurrently

Reviewed-by: never, kvn
This commit is contained in:
Eric Caspole 2010-05-17 16:50:07 -07:00 committed by Tom Rodriguez
parent 85854f0e13
commit 430574f398
9 changed files with 171 additions and 89 deletions

View file

@ -82,7 +82,6 @@ class PcDescCache VALUE_OBJ_CLASS_SPEC {
struct nmFlags {
friend class VMStructs;
unsigned int version:8; // version number (0 = first version)
unsigned int level:4; // optimization level
unsigned int age:4; // age (in # of sweep steps)
unsigned int state:2; // {alive, zombie, unloaded)
@ -410,14 +409,13 @@ class nmethod : public CodeBlob {
void flush_dependencies(BoolObjectClosure* is_alive);
bool has_flushed_dependencies() { return flags.hasFlushedDependencies; }
void set_has_flushed_dependencies() {
check_safepoint();
assert(!has_flushed_dependencies(), "should only happen once");
flags.hasFlushedDependencies = 1;
}
bool is_marked_for_reclamation() const { return flags.markedForReclamation; }
void mark_for_reclamation() { check_safepoint(); flags.markedForReclamation = 1; }
void unmark_for_reclamation() { check_safepoint(); flags.markedForReclamation = 0; }
void mark_for_reclamation() { flags.markedForReclamation = 1; }
void unmark_for_reclamation() { flags.markedForReclamation = 0; }
bool has_unsafe_access() const { return flags.has_unsafe_access; }
void set_has_unsafe_access(bool z) { flags.has_unsafe_access = z; }
@ -428,9 +426,6 @@ class nmethod : public CodeBlob {
bool is_speculatively_disconnected() const { return flags.speculatively_disconnected; }
void set_speculatively_disconnected(bool z) { flags.speculatively_disconnected = z; }
int level() const { return flags.level; }
void set_level(int newLevel) { check_safepoint(); flags.level = newLevel; }
int comp_level() const { return _comp_level; }
int version() const { return flags.version; }