Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.hpp @ 11173:6b0fd0964b87
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 31 Jul 2013 11:00:54 +0200 |
parents | 836a62f43af9 825e6cb66923 |
children | cefad50507d8 |
comparison
equal
deleted
inserted
replaced
10912:4ea54634f03e | 11173:6b0fd0964b87 |
---|---|
131 private: | 131 private: |
132 int _offset; | 132 int _offset; |
133 uint _count; | 133 uint _count; |
134 }; | 134 }; |
135 | 135 |
136 struct JvmtiCachedClassFileData; | |
137 | |
136 class InstanceKlass: public Klass { | 138 class InstanceKlass: public Klass { |
137 friend class VMStructs; | 139 friend class VMStructs; |
138 friend class ClassFileParser; | 140 friend class ClassFileParser; |
139 friend class CompileReplay; | 141 friend class CompileReplay; |
140 | 142 |
247 BreakpointInfo* _breakpoints; // bpt lists, managed by Method* | 249 BreakpointInfo* _breakpoints; // bpt lists, managed by Method* |
248 // Array of interesting part(s) of the previous version(s) of this | 250 // Array of interesting part(s) of the previous version(s) of this |
249 // InstanceKlass. See PreviousVersionWalker below. | 251 // InstanceKlass. See PreviousVersionWalker below. |
250 GrowableArray<PreviousVersionNode *>* _previous_versions; | 252 GrowableArray<PreviousVersionNode *>* _previous_versions; |
251 // JVMTI fields can be moved to their own structure - see 6315920 | 253 // JVMTI fields can be moved to their own structure - see 6315920 |
252 unsigned char * _cached_class_file_bytes; // JVMTI: cached class file, before retransformable agent modified it in CFLH | 254 // JVMTI: cached class file, before retransformable agent modified it in CFLH |
253 jint _cached_class_file_len; // JVMTI: length of above | 255 JvmtiCachedClassFileData* _cached_class_file; |
254 | 256 |
255 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change | 257 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change |
256 | 258 |
257 // Class states are defined as ClassState (see above). | 259 // Class states are defined as ClassState (see above). |
258 // Place the _init_state here to utilize the unused 2-byte after | 260 // Place the _init_state here to utilize the unused 2-byte after |
613 } | 615 } |
614 | 616 |
615 static void purge_previous_versions(InstanceKlass* ik); | 617 static void purge_previous_versions(InstanceKlass* ik); |
616 | 618 |
617 // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation | 619 // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation |
618 void set_cached_class_file(unsigned char *class_file_bytes, | 620 void set_cached_class_file(JvmtiCachedClassFileData *data) { |
619 jint class_file_len) { _cached_class_file_len = class_file_len; | 621 _cached_class_file = data; |
620 _cached_class_file_bytes = class_file_bytes; } | 622 } |
621 jint get_cached_class_file_len() { return _cached_class_file_len; } | 623 JvmtiCachedClassFileData * get_cached_class_file() { return _cached_class_file; } |
622 unsigned char * get_cached_class_file_bytes() { return _cached_class_file_bytes; } | 624 jint get_cached_class_file_len(); |
625 unsigned char * get_cached_class_file_bytes(); | |
623 | 626 |
624 // JVMTI: Support for caching of field indices, types, and offsets | 627 // JVMTI: Support for caching of field indices, types, and offsets |
625 void set_jvmti_cached_class_field_map(JvmtiCachedClassFieldMap* descriptor) { | 628 void set_jvmti_cached_class_field_map(JvmtiCachedClassFieldMap* descriptor) { |
626 _jvmti_cached_class_field_map = descriptor; | 629 _jvmti_cached_class_field_map = descriptor; |
627 } | 630 } |
792 void do_local_static_fields(void f(fieldDescriptor*, TRAPS), TRAPS); | 795 void do_local_static_fields(void f(fieldDescriptor*, TRAPS), TRAPS); |
793 | 796 |
794 void methods_do(void f(Method* method)); | 797 void methods_do(void f(Method* method)); |
795 void array_klasses_do(void f(Klass* k)); | 798 void array_klasses_do(void f(Klass* k)); |
796 void array_klasses_do(void f(Klass* k, TRAPS), TRAPS); | 799 void array_klasses_do(void f(Klass* k, TRAPS), TRAPS); |
797 void with_array_klasses_do(void f(Klass* k)); | |
798 bool super_types_do(SuperTypeClosure* blk); | 800 bool super_types_do(SuperTypeClosure* blk); |
799 | 801 |
800 // Casting from Klass* | 802 // Casting from Klass* |
801 static InstanceKlass* cast(Klass* k) { | 803 static InstanceKlass* cast(Klass* k) { |
802 assert(k->is_klass(), "must be"); | 804 assert(k->is_klass(), "must be"); |
871 } | 873 } |
872 } else { | 874 } else { |
873 return NULL; | 875 return NULL; |
874 } | 876 } |
875 } | 877 } |
876 | |
877 // Allocation profiling support | |
878 juint alloc_size() const { return _alloc_count * size_helper(); } | |
879 void set_alloc_size(juint n) {} | |
880 | 878 |
881 // Use this to return the size of an instance in heap words: | 879 // Use this to return the size of an instance in heap words: |
882 int size_helper() const { | 880 int size_helper() const { |
883 return layout_helper_to_size_helper(layout_helper()); | 881 return layout_helper_to_size_helper(layout_helper()); |
884 } | 882 } |
1048 #endif | 1046 #endif |
1049 | 1047 |
1050 const char* internal_name() const; | 1048 const char* internal_name() const; |
1051 | 1049 |
1052 // Verification | 1050 // Verification |
1053 void verify_on(outputStream* st); | 1051 void verify_on(outputStream* st, bool check_dictionary); |
1054 | 1052 |
1055 void oop_verify_on(oop obj, outputStream* st); | 1053 void oop_verify_on(oop obj, outputStream* st); |
1056 }; | 1054 }; |
1057 | 1055 |
1058 inline Method* InstanceKlass::method_at_vtable(int index) { | 1056 inline Method* InstanceKlass::method_at_vtable(int index) { |