comparison src/share/vm/code/nmethod.hpp @ 3464:be4ca325525a

Merge.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Jul 2011 17:32:44 -0700
parents 75a99b4f1c98 2aa9ddbb9e60
children 345c3bbf9c3c
comparison
equal deleted inserted replaced
3239:7c4b4daac19b 3464:be4ca325525a
107 class xmlStream; 107 class xmlStream;
108 108
109 class nmethod : public CodeBlob { 109 class nmethod : public CodeBlob {
110 friend class VMStructs; 110 friend class VMStructs;
111 friend class NMethodSweeper; 111 friend class NMethodSweeper;
112 friend class CodeCache; // non-perm oops 112 friend class CodeCache; // scavengable oops
113 private: 113 private:
114 // Shared fields for all nmethod's 114 // Shared fields for all nmethod's
115 methodOop _method; 115 methodOop _method;
116 int _entry_bci; // != InvocationEntryBci if this nmethod is an on-stack replacement method 116 int _entry_bci; // != InvocationEntryBci if this nmethod is an on-stack replacement method
117 jmethodID _jmethod_id; // Cache of method()->jmethod_id() 117 jmethodID _jmethod_id; // Cache of method()->jmethod_id()
464 void verify_oop_relocations(); 464 void verify_oop_relocations();
465 465
466 bool is_at_poll_return(address pc); 466 bool is_at_poll_return(address pc);
467 bool is_at_poll_or_poll_return(address pc); 467 bool is_at_poll_or_poll_return(address pc);
468 468
469 // Non-perm oop support 469 // Scavengable oop support
470 bool on_scavenge_root_list() const { return (_scavenge_root_state & 1) != 0; } 470 bool on_scavenge_root_list() const { return (_scavenge_root_state & 1) != 0; }
471 protected: 471 protected:
472 enum { npl_on_list = 0x01, npl_marked = 0x10 }; 472 enum { sl_on_list = 0x01, sl_marked = 0x10 };
473 void set_on_scavenge_root_list() { _scavenge_root_state = npl_on_list; } 473 void set_on_scavenge_root_list() { _scavenge_root_state = sl_on_list; }
474 void clear_on_scavenge_root_list() { _scavenge_root_state = 0; } 474 void clear_on_scavenge_root_list() { _scavenge_root_state = 0; }
475 // assertion-checking and pruning logic uses the bits of _scavenge_root_state 475 // assertion-checking and pruning logic uses the bits of _scavenge_root_state
476 #ifndef PRODUCT 476 #ifndef PRODUCT
477 void set_scavenge_root_marked() { _scavenge_root_state |= npl_marked; } 477 void set_scavenge_root_marked() { _scavenge_root_state |= sl_marked; }
478 void clear_scavenge_root_marked() { _scavenge_root_state &= ~npl_marked; } 478 void clear_scavenge_root_marked() { _scavenge_root_state &= ~sl_marked; }
479 bool scavenge_root_not_marked() { return (_scavenge_root_state &~ npl_on_list) == 0; } 479 bool scavenge_root_not_marked() { return (_scavenge_root_state &~ sl_on_list) == 0; }
480 // N.B. there is no positive marked query, and we only use the not_marked query for asserts. 480 // N.B. there is no positive marked query, and we only use the not_marked query for asserts.
481 #endif //PRODUCT 481 #endif //PRODUCT
482 nmethod* scavenge_root_link() const { return _scavenge_root_link; } 482 nmethod* scavenge_root_link() const { return _scavenge_root_link; }
483 void set_scavenge_root_link(nmethod *n) { _scavenge_root_link = n; } 483 void set_scavenge_root_link(nmethod *n) { _scavenge_root_link = n; }
484 484