Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/nmethod.hpp @ 1538:bfe29ec02863
6950075: nmethod sweeper should operate concurrently
Reviewed-by: never, kvn
Contributed-by: eric.caspole@amd.com
author | never |
---|---|
date | Mon, 17 May 2010 16:50:07 -0700 |
parents | 9f5b60a14736 |
children | c18cbe5936b8 1a5913bf5e19 |
comparison
equal
deleted
inserted
replaced
1537:79bf863697eb | 1538:bfe29ec02863 |
---|---|
80 // nmethods (native methods) are the compiled code versions of Java methods. | 80 // nmethods (native methods) are the compiled code versions of Java methods. |
81 | 81 |
82 struct nmFlags { | 82 struct nmFlags { |
83 friend class VMStructs; | 83 friend class VMStructs; |
84 unsigned int version:8; // version number (0 = first version) | 84 unsigned int version:8; // version number (0 = first version) |
85 unsigned int level:4; // optimization level | |
86 unsigned int age:4; // age (in # of sweep steps) | 85 unsigned int age:4; // age (in # of sweep steps) |
87 | 86 |
88 unsigned int state:2; // {alive, zombie, unloaded) | 87 unsigned int state:2; // {alive, zombie, unloaded) |
89 | 88 |
90 unsigned int isUncommonRecompiled:1; // recompiled because of uncommon trap? | 89 unsigned int isUncommonRecompiled:1; // recompiled because of uncommon trap? |
408 | 407 |
409 bool has_dependencies() { return dependencies_size() != 0; } | 408 bool has_dependencies() { return dependencies_size() != 0; } |
410 void flush_dependencies(BoolObjectClosure* is_alive); | 409 void flush_dependencies(BoolObjectClosure* is_alive); |
411 bool has_flushed_dependencies() { return flags.hasFlushedDependencies; } | 410 bool has_flushed_dependencies() { return flags.hasFlushedDependencies; } |
412 void set_has_flushed_dependencies() { | 411 void set_has_flushed_dependencies() { |
413 check_safepoint(); | |
414 assert(!has_flushed_dependencies(), "should only happen once"); | 412 assert(!has_flushed_dependencies(), "should only happen once"); |
415 flags.hasFlushedDependencies = 1; | 413 flags.hasFlushedDependencies = 1; |
416 } | 414 } |
417 | 415 |
418 bool is_marked_for_reclamation() const { return flags.markedForReclamation; } | 416 bool is_marked_for_reclamation() const { return flags.markedForReclamation; } |
419 void mark_for_reclamation() { check_safepoint(); flags.markedForReclamation = 1; } | 417 void mark_for_reclamation() { flags.markedForReclamation = 1; } |
420 void unmark_for_reclamation() { check_safepoint(); flags.markedForReclamation = 0; } | 418 void unmark_for_reclamation() { flags.markedForReclamation = 0; } |
421 | 419 |
422 bool has_unsafe_access() const { return flags.has_unsafe_access; } | 420 bool has_unsafe_access() const { return flags.has_unsafe_access; } |
423 void set_has_unsafe_access(bool z) { flags.has_unsafe_access = z; } | 421 void set_has_unsafe_access(bool z) { flags.has_unsafe_access = z; } |
424 | 422 |
425 bool has_method_handle_invokes() const { return flags.has_method_handle_invokes; } | 423 bool has_method_handle_invokes() const { return flags.has_method_handle_invokes; } |
426 void set_has_method_handle_invokes(bool z) { flags.has_method_handle_invokes = z; } | 424 void set_has_method_handle_invokes(bool z) { flags.has_method_handle_invokes = z; } |
427 | 425 |
428 bool is_speculatively_disconnected() const { return flags.speculatively_disconnected; } | 426 bool is_speculatively_disconnected() const { return flags.speculatively_disconnected; } |
429 void set_speculatively_disconnected(bool z) { flags.speculatively_disconnected = z; } | 427 void set_speculatively_disconnected(bool z) { flags.speculatively_disconnected = z; } |
430 | |
431 int level() const { return flags.level; } | |
432 void set_level(int newLevel) { check_safepoint(); flags.level = newLevel; } | |
433 | 428 |
434 int comp_level() const { return _comp_level; } | 429 int comp_level() const { return _comp_level; } |
435 | 430 |
436 int version() const { return flags.version; } | 431 int version() const { return flags.version; } |
437 void set_version(int v); | 432 void set_version(int v); |