< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page

 218   u2              _static_oop_field_count;  // number of static oop fields in this klass
 219   u2              _java_fields_count;       // The number of declared Java fields
 220 
 221   volatile u2     _idnum_allocated_count;   // JNI/JVMTI: increments with the addition of methods, old ids don't change
 222 
 223   // _is_marked_dependent can be set concurrently, thus cannot be part of the
 224   // _misc_flags.
 225   bool            _is_marked_dependent;     // used for marking during flushing and deoptimization
 226 
 227   // Class states are defined as ClassState (see above).
 228   // Place the _init_state here to utilize the unused 2-byte after
 229   // _idnum_allocated_count.
 230   u1              _init_state;              // state of class
 231 
 232   // This can be used to quickly discriminate among the four kinds of
 233   // InstanceKlass. This should be an enum (?)
 234   static const unsigned _kind_other        = 0; // concrete InstanceKlass
 235   static const unsigned _kind_reference    = 1; // InstanceRefKlass
 236   static const unsigned _kind_class_loader = 2; // InstanceClassLoaderKlass
 237   static const unsigned _kind_mirror       = 3; // InstanceMirrorKlass


 238 
 239   u1              _reference_type;                // reference type
 240   u1              _kind;                          // kind of InstanceKlass
 241 
 242   enum {
 243     _misc_rewritten                           = 1 << 0,  // methods rewritten.
 244     _misc_has_nonstatic_fields                = 1 << 1,  // for sizing with UseCompressedOops
 245     _misc_should_verify_class                 = 1 << 2,  // allow caching of preverification
 246     _misc_unused                              = 1 << 3,  // not currently used
 247     _misc_is_contended                        = 1 << 4,  // marked with contended annotation
 248     _misc_has_nonstatic_concrete_methods      = 1 << 5,  // class/superclass/implemented interfaces has non-static, concrete methods
 249     _misc_declares_nonstatic_concrete_methods = 1 << 6,  // directly declares non-static, concrete methods
 250     _misc_has_been_redefined                  = 1 << 7,  // class has been redefined
 251     _misc_shared_loading_failed               = 1 << 8,  // class has been loaded from shared archive
 252     _misc_is_scratch_class                    = 1 << 9,  // class is the redefined scratch class
 253     _misc_is_shared_boot_class                = 1 << 10, // defining class loader is boot class loader
 254     _misc_is_shared_platform_class            = 1 << 11, // defining class loader is platform class loader
 255     _misc_is_shared_app_class                 = 1 << 12, // defining class loader is app class loader
 256     _misc_has_resolved_methods                = 1 << 13, // resolved methods table entries added for this class
 257     _misc_is_being_redefined                  = 1 << 14, // used for locking redefinition

 771   }
 772 
 773   bool is_scratch_class() const {
 774     return (_misc_flags & _misc_is_scratch_class) != 0;
 775   }
 776 
 777   void set_is_scratch_class() {
 778     _misc_flags |= _misc_is_scratch_class;
 779   }
 780 
 781   bool has_resolved_methods() const {
 782     return (_misc_flags & _misc_has_resolved_methods) != 0;
 783   }
 784 
 785   void set_has_resolved_methods() {
 786     _misc_flags |= _misc_has_resolved_methods;
 787   }
 788 private:
 789 
 790   void set_kind(unsigned kind) {

 791     _kind = (u1)kind;
 792   }
 793 
 794   bool is_kind(unsigned desired) const {
 795     return _kind == (u1)desired;
 796   }
 797 
 798 public:
 799 
 800   // Other is anything that is not one of the more specialized kinds of InstanceKlass.
 801   bool is_other_instance_klass() const        { return is_kind(_kind_other); }
 802   bool is_reference_instance_klass() const    { return is_kind(_kind_reference); }
 803   bool is_mirror_instance_klass() const       { return is_kind(_kind_mirror); }
 804   bool is_class_loader_instance_klass() const { return is_kind(_kind_class_loader); }

 805 
 806 #if INCLUDE_JVMTI
 807 
 808   void init_previous_versions() {
 809     _previous_versions = NULL;
 810   }
 811 
 812  private:
 813   static bool  _has_previous_versions;
 814  public:
 815   static void purge_previous_versions(InstanceKlass* ik) {
 816     if (ik->has_been_redefined()) {
 817       ik->purge_previous_version_list();
 818     }
 819   }
 820 
 821   static bool has_previous_versions_and_reset();
 822   static bool has_previous_versions() { return _has_previous_versions; }
 823 
 824   // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation

 218   u2              _static_oop_field_count;  // number of static oop fields in this klass
 219   u2              _java_fields_count;       // The number of declared Java fields
 220 
 221   volatile u2     _idnum_allocated_count;   // JNI/JVMTI: increments with the addition of methods, old ids don't change
 222 
 223   // _is_marked_dependent can be set concurrently, thus cannot be part of the
 224   // _misc_flags.
 225   bool            _is_marked_dependent;     // used for marking during flushing and deoptimization
 226 
 227   // Class states are defined as ClassState (see above).
 228   // Place the _init_state here to utilize the unused 2-byte after
 229   // _idnum_allocated_count.
 230   u1              _init_state;              // state of class
 231 
 232   // This can be used to quickly discriminate among the four kinds of
 233   // InstanceKlass. This should be an enum (?)
 234   static const unsigned _kind_other        = 0; // concrete InstanceKlass
 235   static const unsigned _kind_reference    = 1; // InstanceRefKlass
 236   static const unsigned _kind_class_loader = 2; // InstanceClassLoaderKlass
 237   static const unsigned _kind_mirror       = 3; // InstanceMirrorKlass
 238   static const unsigned _misc_kind_stack_chunk  = 4; // InstanceStackChunk
 239   static const unsigned _misc_kind_last  = _misc_kind_stack_chunk;
 240 
 241   u1              _reference_type;                // reference type
 242   u1              _kind;                          // kind of InstanceKlass
 243 
 244   enum {
 245     _misc_rewritten                           = 1 << 0,  // methods rewritten.
 246     _misc_has_nonstatic_fields                = 1 << 1,  // for sizing with UseCompressedOops
 247     _misc_should_verify_class                 = 1 << 2,  // allow caching of preverification
 248     _misc_unused                              = 1 << 3,  // not currently used
 249     _misc_is_contended                        = 1 << 4,  // marked with contended annotation
 250     _misc_has_nonstatic_concrete_methods      = 1 << 5,  // class/superclass/implemented interfaces has non-static, concrete methods
 251     _misc_declares_nonstatic_concrete_methods = 1 << 6,  // directly declares non-static, concrete methods
 252     _misc_has_been_redefined                  = 1 << 7,  // class has been redefined
 253     _misc_shared_loading_failed               = 1 << 8,  // class has been loaded from shared archive
 254     _misc_is_scratch_class                    = 1 << 9,  // class is the redefined scratch class
 255     _misc_is_shared_boot_class                = 1 << 10, // defining class loader is boot class loader
 256     _misc_is_shared_platform_class            = 1 << 11, // defining class loader is platform class loader
 257     _misc_is_shared_app_class                 = 1 << 12, // defining class loader is app class loader
 258     _misc_has_resolved_methods                = 1 << 13, // resolved methods table entries added for this class
 259     _misc_is_being_redefined                  = 1 << 14, // used for locking redefinition

 773   }
 774 
 775   bool is_scratch_class() const {
 776     return (_misc_flags & _misc_is_scratch_class) != 0;
 777   }
 778 
 779   void set_is_scratch_class() {
 780     _misc_flags |= _misc_is_scratch_class;
 781   }
 782 
 783   bool has_resolved_methods() const {
 784     return (_misc_flags & _misc_has_resolved_methods) != 0;
 785   }
 786 
 787   void set_has_resolved_methods() {
 788     _misc_flags |= _misc_has_resolved_methods;
 789   }
 790 private:
 791 
 792   void set_kind(unsigned kind) {
 793     assert(kind <= _misc_kind_last, "Invalid InstanceKlass kind");
 794     _kind = (u1)kind;
 795   }
 796 
 797   bool is_kind(unsigned desired) const {
 798     return _kind == (u1)desired;
 799   }
 800 
 801 public:
 802 
 803   // Other is anything that is not one of the more specialized kinds of InstanceKlass.
 804   bool is_other_instance_klass() const        { return is_kind(_kind_other); }
 805   bool is_reference_instance_klass() const    { return is_kind(_kind_reference); }
 806   bool is_mirror_instance_klass() const       { return is_kind(_kind_mirror); }
 807   bool is_class_loader_instance_klass() const { return is_kind(_kind_class_loader); }
 808   bool is_stack_chunk_instance_klass() const  { return is_kind(_misc_kind_stack_chunk); }
 809 
 810 #if INCLUDE_JVMTI
 811 
 812   void init_previous_versions() {
 813     _previous_versions = NULL;
 814   }
 815 
 816  private:
 817   static bool  _has_previous_versions;
 818  public:
 819   static void purge_previous_versions(InstanceKlass* ik) {
 820     if (ik->has_been_redefined()) {
 821       ik->purge_previous_version_list();
 822     }
 823   }
 824 
 825   static bool has_previous_versions_and_reset();
 826   static bool has_previous_versions() { return _has_previous_versions; }
 827 
 828   // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation
< prev index next >