< prev index next >

src/share/vm/oops/instanceKlass.hpp

Print this page




  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_OOPS_INSTANCEKLASS_HPP
  26 #define SHARE_VM_OOPS_INSTANCEKLASS_HPP
  27 
  28 #include "classfile/classLoaderData.hpp"
  29 #include "memory/referenceType.hpp"
  30 #include "oops/annotations.hpp"
  31 #include "oops/constMethod.hpp"
  32 #include "oops/fieldInfo.hpp"
  33 #include "oops/instanceOop.hpp"
  34 #include "oops/klassVtable.hpp"
  35 #include "runtime/atomic.hpp"
  36 #include "runtime/handles.hpp"
  37 #include "runtime/os.hpp"
  38 #include "utilities/accessFlags.hpp"
  39 #include "utilities/bitMap.inline.hpp"
  40 #include "utilities/macros.hpp"
  41 #include "trace/traceMacros.hpp"


  42 
  43 // An InstanceKlass is the VM level representation of a Java class.
  44 // It contains all information needed for at class at execution runtime.
  45 
  46 //  InstanceKlass layout:
  47 //    [C++ vtbl pointer           ] Klass
  48 //    [subtype cache              ] Klass
  49 //    [instance size              ] Klass
  50 //    [java mirror                ] Klass
  51 //    [super                      ] Klass
  52 //    [access_flags               ] Klass
  53 //    [name                       ] Klass
  54 //    [first subklass             ] Klass
  55 //    [next sibling               ] Klass
  56 //    [array klasses              ]
  57 //    [methods                    ]
  58 //    [local interfaces           ]
  59 //    [transitive interfaces      ]
  60 //    [fields                     ]
  61 //    [constants                  ]


 816 
 817   // maintenance of deoptimization dependencies
 818   int mark_dependent_nmethods(DepChange& changes);
 819   void add_dependent_nmethod(nmethod* nm);
 820   void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);
 821 
 822   // On-stack replacement support
 823   nmethod* osr_nmethods_head() const         { return _osr_nmethods_head; };
 824   void set_osr_nmethods_head(nmethod* h)     { _osr_nmethods_head = h; };
 825   void add_osr_nmethod(nmethod* n);
 826   void remove_osr_nmethod(nmethod* n);
 827   int mark_osr_nmethods(const Method* m);
 828   nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const;
 829 
 830   // Breakpoint support (see methods on Method* for details)
 831   BreakpointInfo* breakpoints() const       { return _breakpoints; };
 832   void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; };
 833 
 834   // support for stub routines
 835   static ByteSize init_state_offset()  { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }
 836   TRACE_DEFINE_OFFSET;
 837   static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); }
 838 
 839   // subclass/subinterface checks
 840   bool implements_interface(Klass* k) const;
 841   bool is_same_or_direct_interface(Klass* k) const;
 842 
 843 #ifdef ASSERT
 844   // check whether this class or one of its superclasses was redefined
 845   bool has_redefined_this_or_super() const;
 846 #endif
 847 
 848   // Access to the implementor of an interface.
 849   Klass* implementor() const
 850   {
 851     Klass** k = adr_implementor();
 852     if (k == NULL) {
 853       return NULL;
 854     } else {
 855       return *k;
 856     }




  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_OOPS_INSTANCEKLASS_HPP
  26 #define SHARE_VM_OOPS_INSTANCEKLASS_HPP
  27 
  28 #include "classfile/classLoaderData.hpp"
  29 #include "memory/referenceType.hpp"
  30 #include "oops/annotations.hpp"
  31 #include "oops/constMethod.hpp"
  32 #include "oops/fieldInfo.hpp"
  33 #include "oops/instanceOop.hpp"
  34 #include "oops/klassVtable.hpp"
  35 #include "runtime/atomic.hpp"
  36 #include "runtime/handles.hpp"
  37 #include "runtime/os.hpp"
  38 #include "utilities/accessFlags.hpp"
  39 #include "utilities/bitMap.inline.hpp"
  40 #include "utilities/macros.hpp"
  41 #if INCLUDE_JFR
  42 #include "jfr/support/jfrKlassExtension.hpp"
  43 #endif
  44 
  45 // An InstanceKlass is the VM level representation of a Java class.
  46 // It contains all information needed for at class at execution runtime.
  47 
  48 //  InstanceKlass layout:
  49 //    [C++ vtbl pointer           ] Klass
  50 //    [subtype cache              ] Klass
  51 //    [instance size              ] Klass
  52 //    [java mirror                ] Klass
  53 //    [super                      ] Klass
  54 //    [access_flags               ] Klass
  55 //    [name                       ] Klass
  56 //    [first subklass             ] Klass
  57 //    [next sibling               ] Klass
  58 //    [array klasses              ]
  59 //    [methods                    ]
  60 //    [local interfaces           ]
  61 //    [transitive interfaces      ]
  62 //    [fields                     ]
  63 //    [constants                  ]


 818 
 819   // maintenance of deoptimization dependencies
 820   int mark_dependent_nmethods(DepChange& changes);
 821   void add_dependent_nmethod(nmethod* nm);
 822   void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);
 823 
 824   // On-stack replacement support
 825   nmethod* osr_nmethods_head() const         { return _osr_nmethods_head; };
 826   void set_osr_nmethods_head(nmethod* h)     { _osr_nmethods_head = h; };
 827   void add_osr_nmethod(nmethod* n);
 828   void remove_osr_nmethod(nmethod* n);
 829   int mark_osr_nmethods(const Method* m);
 830   nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const;
 831 
 832   // Breakpoint support (see methods on Method* for details)
 833   BreakpointInfo* breakpoints() const       { return _breakpoints; };
 834   void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; };
 835 
 836   // support for stub routines
 837   static ByteSize init_state_offset()  { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }
 838   JFR_ONLY(DEFINE_KLASS_TRACE_ID_OFFSET;)
 839   static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); }
 840 
 841   // subclass/subinterface checks
 842   bool implements_interface(Klass* k) const;
 843   bool is_same_or_direct_interface(Klass* k) const;
 844 
 845 #ifdef ASSERT
 846   // check whether this class or one of its superclasses was redefined
 847   bool has_redefined_this_or_super() const;
 848 #endif
 849 
 850   // Access to the implementor of an interface.
 851   Klass* implementor() const
 852   {
 853     Klass** k = adr_implementor();
 854     if (k == NULL) {
 855       return NULL;
 856     } else {
 857       return *k;
 858     }


< prev index next >