src/share/vm/oops/instanceKlass.hpp

Print this page
rev 6841 : mq
rev 6842 : mq


 963   }
 964 
 965 #define InstanceKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)      \
 966   int  oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk);           \
 967   int  oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk,        \
 968                                       MemRegion mr);
 969 
 970   ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)
 971   ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)
 972 
 973 #if INCLUDE_ALL_GCS
 974 #define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
 975   int  oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
 976 
 977   ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
 978   ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
 979 #endif // INCLUDE_ALL_GCS
 980 
 981   u2 idnum_allocated_count() const      { return _idnum_allocated_count; }
 982 







 983 private:
 984   // initialization state
 985 #ifdef ASSERT
 986   void set_init_state(ClassState state);
 987 #else
 988   void set_init_state(ClassState state) { _init_state = (u1)state; }
 989 #endif
 990   void set_rewritten()                  { _misc_flags |= _misc_rewritten; }
 991   void set_init_thread(Thread *thread)  { _init_thread = thread; }
 992 
 993   // The RedefineClasses() API can cause new method idnums to be needed
 994   // which will cause the caches to grow. Safety requires different
 995   // cache management logic if the caches can grow instead of just
 996   // going from NULL to non-NULL.
 997   bool idnum_can_increment() const      { return has_been_redefined(); }
 998   jmethodID* methods_jmethod_ids_acquire() const
 999          { return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); }
1000   void release_set_methods_jmethod_ids(jmethodID* jmeths)
1001          { OrderAccess::release_store_ptr(&_methods_jmethod_ids, jmeths); }
1002 


1021   static Klass* array_klass_impl                        (instanceKlassHandle this_k, bool or_null, int n, TRAPS);
1022   static void do_local_static_fields_impl               (instanceKlassHandle this_k, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);
1023   /* jni_id_for_impl for jfieldID only */
1024   static JNIid* jni_id_for_impl                         (instanceKlassHandle this_k, int offset);
1025 
1026   // Returns the array class for the n'th dimension
1027   Klass* array_klass_impl(bool or_null, int n, TRAPS);
1028 
1029   // Returns the array class with this class as element type
1030   Klass* array_klass_impl(bool or_null, TRAPS);
1031 
1032   // find a local method (returns NULL if not found)
1033   Method* find_method_impl(Symbol* name, Symbol* signature, bool skipping_overpass) const;
1034   static Method* find_method_impl(Array<Method*>* methods, Symbol* name, Symbol* signature, bool skipping_overpass);
1035 
1036   // Free CHeap allocated fields.
1037   void release_C_heap_structures();
1038 public:
1039   // CDS support - remove and restore oops from metadata. Oops are not shared.
1040   virtual void remove_unshareable_info();
1041   virtual void restore_unshareable_info(TRAPS);
1042 
1043   // jvm support
1044   jint compute_modifier_flags(TRAPS) const;
1045 
1046   // JSR-292 support
1047   MemberNameTable* member_names() { return _member_names; }
1048   void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }
1049   void add_member_name(int index, Handle member_name);
1050   oop  get_member_name(int index);
1051 
1052 public:
1053   // JVMTI support
1054   jint jvmti_class_status() const;
1055 
1056  public:
1057   // Printing
1058 #ifndef PRODUCT
1059   void print_on(outputStream* st) const;
1060 #endif
1061   void print_value_on(outputStream* st) const;




 963   }
 964 
 965 #define InstanceKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)      \
 966   int  oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk);           \
 967   int  oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk,        \
 968                                       MemRegion mr);
 969 
 970   ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)
 971   ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)
 972 
 973 #if INCLUDE_ALL_GCS
 974 #define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
 975   int  oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
 976 
 977   ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
 978   ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
 979 #endif // INCLUDE_ALL_GCS
 980 
 981   u2 idnum_allocated_count() const      { return _idnum_allocated_count; }
 982 
 983 public:
 984   void set_in_error_state() {
 985     assert(DumpSharedSpaces, "only call this when dumping archive");
 986     _init_state = initialization_error;
 987   }
 988   bool check_sharing_error_state();
 989 
 990 private:
 991   // initialization state
 992 #ifdef ASSERT
 993   void set_init_state(ClassState state);
 994 #else
 995   void set_init_state(ClassState state) { _init_state = (u1)state; }
 996 #endif
 997   void set_rewritten()                  { _misc_flags |= _misc_rewritten; }
 998   void set_init_thread(Thread *thread)  { _init_thread = thread; }
 999 
1000   // The RedefineClasses() API can cause new method idnums to be needed
1001   // which will cause the caches to grow. Safety requires different
1002   // cache management logic if the caches can grow instead of just
1003   // going from NULL to non-NULL.
1004   bool idnum_can_increment() const      { return has_been_redefined(); }
1005   jmethodID* methods_jmethod_ids_acquire() const
1006          { return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); }
1007   void release_set_methods_jmethod_ids(jmethodID* jmeths)
1008          { OrderAccess::release_store_ptr(&_methods_jmethod_ids, jmeths); }
1009 


1028   static Klass* array_klass_impl                        (instanceKlassHandle this_k, bool or_null, int n, TRAPS);
1029   static void do_local_static_fields_impl               (instanceKlassHandle this_k, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);
1030   /* jni_id_for_impl for jfieldID only */
1031   static JNIid* jni_id_for_impl                         (instanceKlassHandle this_k, int offset);
1032 
1033   // Returns the array class for the n'th dimension
1034   Klass* array_klass_impl(bool or_null, int n, TRAPS);
1035 
1036   // Returns the array class with this class as element type
1037   Klass* array_klass_impl(bool or_null, TRAPS);
1038 
1039   // find a local method (returns NULL if not found)
1040   Method* find_method_impl(Symbol* name, Symbol* signature, bool skipping_overpass) const;
1041   static Method* find_method_impl(Array<Method*>* methods, Symbol* name, Symbol* signature, bool skipping_overpass);
1042 
1043   // Free CHeap allocated fields.
1044   void release_C_heap_structures();
1045 public:
1046   // CDS support - remove and restore oops from metadata. Oops are not shared.
1047   virtual void remove_unshareable_info();
1048   virtual void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
1049 
1050   // jvm support
1051   jint compute_modifier_flags(TRAPS) const;
1052 
1053   // JSR-292 support
1054   MemberNameTable* member_names() { return _member_names; }
1055   void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }
1056   void add_member_name(int index, Handle member_name);
1057   oop  get_member_name(int index);
1058 
1059 public:
1060   // JVMTI support
1061   jint jvmti_class_status() const;
1062 
1063  public:
1064   // Printing
1065 #ifndef PRODUCT
1066   void print_on(outputStream* st) const;
1067 #endif
1068   void print_value_on(outputStream* st) const;