src/share/vm/oops/instanceKlass.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
7017732 Cdiff src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
Print this page
*** 73,84 ****
// [initialization state ]
// [initializing thread ]
// [Java vtable length ]
// [oop map cache (stack maps) ]
// [EMBEDDED Java vtable ] size in words = vtable_len
- // [EMBEDDED static oop fields ] size in words = static_oop_fields_size
- // [ static non-oop fields ] size in words = static_field_size - static_oop_fields_size
// [EMBEDDED nonstatic oop-map blocks] size in words = nonstatic_oop_map_size
//
// The embedded nonstatic oop-map blocks are short pairs (offset, length) indicating
// where oops are located in instances of this klass.
--- 73,82 ----
*** 228,238 ****
// Number of heapOopSize words used by non-static fields in this klass
// (including inherited fields but after header_size()).
int _nonstatic_field_size;
int _static_field_size; // number words used by static fields (oop and non-oop) in this klass
! int _static_oop_field_size;// number of static oop fields in this klass
int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
bool _is_marked_dependent; // used for marking during flushing and deoptimization
bool _rewritten; // methods rewritten.
bool _has_nonstatic_fields; // for sizing with UseCompressedOops
bool _should_verify_class; // allow caching of preverification
--- 226,236 ----
// Number of heapOopSize words used by non-static fields in this klass
// (including inherited fields but after header_size()).
int _nonstatic_field_size;
int _static_field_size; // number words used by static fields (oop and non-oop) in this klass
! int _static_oop_field_count;// number of static oop fields in this klass
int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
bool _is_marked_dependent; // used for marking during flushing and deoptimization
bool _rewritten; // methods rewritten.
bool _has_nonstatic_fields; // for sizing with UseCompressedOops
bool _should_verify_class; // allow caching of preverification
*** 279,290 ****
void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; }
int static_field_size() const { return _static_field_size; }
void set_static_field_size(int size) { _static_field_size = size; }
! int static_oop_field_size() const { return _static_oop_field_size; }
! void set_static_oop_field_size(int size) { _static_oop_field_size = size; }
// Java vtable
int vtable_length() const { return _vtable_len; }
void set_vtable_length(int len) { _vtable_len = len; }
--- 277,288 ----
void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; }
int static_field_size() const { return _static_field_size; }
void set_static_field_size(int size) { _static_field_size = size; }
! int static_oop_field_count() const { return _static_oop_field_count; }
! void set_static_oop_field_count(int size) { _static_oop_field_count = size; }
// Java vtable
int vtable_length() const { return _vtable_len; }
void set_vtable_length(int len) { _vtable_len = len; }
*** 658,697 ****
void with_array_klasses_do(void f(klassOop k));
bool super_types_do(SuperTypeClosure* blk);
// Casting from klassOop
static instanceKlass* cast(klassOop k) {
Klass* kp = k->klass_part();
assert(kp->null_vtbl() || kp->oop_is_instance_slow(), "cast to instanceKlass");
return (instanceKlass*) kp;
}
// Sizing (in words)
static int header_size() { return align_object_offset(oopDesc::header_size() + sizeof(instanceKlass)/HeapWordSize); }
! int object_size() const { return object_size(align_object_offset(vtable_length()) + align_object_offset(itable_length()) + static_field_size() + nonstatic_oop_map_size()); }
static int vtable_start_offset() { return header_size(); }
static int vtable_length_offset() { return oopDesc::header_size() + offset_of(instanceKlass, _vtable_len) / HeapWordSize; }
static int object_size(int extra) { return align_object_size(header_size() + extra); }
intptr_t* start_of_vtable() const { return ((intptr_t*)as_klassOop()) + vtable_start_offset(); }
intptr_t* start_of_itable() const { return start_of_vtable() + align_object_offset(vtable_length()); }
int itable_offset_in_words() const { return start_of_itable() - (intptr_t*)as_klassOop(); }
- // Static field offset is an offset into the Heap, should be converted by
- // based on UseCompressedOop for traversal
- HeapWord* start_of_static_fields() const {
- return (HeapWord*)(start_of_itable() + align_object_offset(itable_length()));
- }
-
intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); }
! int offset_of_static_fields() const {
! return (intptr_t)start_of_static_fields() - (intptr_t)as_klassOop();
! }
OopMapBlock* start_of_nonstatic_oop_maps() const {
! return (OopMapBlock*) (start_of_static_fields() + static_field_size());
}
// Allocation profiling support
juint alloc_size() const { return _alloc_count * size_helper(); }
void set_alloc_size(juint n) {}
--- 656,688 ----
void with_array_klasses_do(void f(klassOop k));
bool super_types_do(SuperTypeClosure* blk);
// Casting from klassOop
static instanceKlass* cast(klassOop k) {
+ assert(k->is_klass(), "must be");
Klass* kp = k->klass_part();
assert(kp->null_vtbl() || kp->oop_is_instance_slow(), "cast to instanceKlass");
return (instanceKlass*) kp;
}
// Sizing (in words)
static int header_size() { return align_object_offset(oopDesc::header_size() + sizeof(instanceKlass)/HeapWordSize); }
! int object_size() const { return object_size(align_object_offset(vtable_length()) + align_object_offset(itable_length()) + nonstatic_oop_map_size()); }
static int vtable_start_offset() { return header_size(); }
static int vtable_length_offset() { return oopDesc::header_size() + offset_of(instanceKlass, _vtable_len) / HeapWordSize; }
static int object_size(int extra) { return align_object_size(header_size() + extra); }
intptr_t* start_of_vtable() const { return ((intptr_t*)as_klassOop()) + vtable_start_offset(); }
intptr_t* start_of_itable() const { return start_of_vtable() + align_object_offset(vtable_length()); }
int itable_offset_in_words() const { return start_of_itable() - (intptr_t*)as_klassOop(); }
intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); }
! address static_field_addr(int offset);
OopMapBlock* start_of_nonstatic_oop_maps() const {
! return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length()));
}
// Allocation profiling support
juint alloc_size() const { return _alloc_count * size_helper(); }
void set_alloc_size(juint n) {}
*** 717,728 ****
klassItable* itable() const; // return new klassItable wrapper
methodOop method_at_itable(klassOop holder, int index, TRAPS);
// Garbage collection
void oop_follow_contents(oop obj);
- void follow_static_fields();
- void adjust_static_fields();
int oop_adjust_pointers(oop obj);
bool object_is_parsable() const { return _init_state != unparsable_by_gc; }
// Value of _init_state must be zero (unparsable_by_gc) when klass field is set.
void follow_weak_klass_links(
--- 708,717 ----
*** 730,749 ****
void release_C_heap_structures();
// Parallel Scavenge and Parallel Old
PARALLEL_GC_DECLS
- #ifndef SERIALGC
- // Parallel Scavenge
- void push_static_fields(PSPromotionManager* pm);
-
- // Parallel Old
- void follow_static_fields(ParCompactionManager* cm);
- void copy_static_fields(ParCompactionManager* cm);
- void update_static_fields();
- #endif // SERIALGC
-
// Naming
const char* signature_name() const;
// Iterators
int oop_oop_iterate(oop obj, OopClosure* blk) {
--- 719,728 ----
*** 768,780 ****
ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
#endif // !SERIALGC
- void iterate_static_fields(OopClosure* closure);
- void iterate_static_fields(OopClosure* closure, MemRegion mr);
-
private:
// initialization state
#ifdef ASSERT
void set_init_state(ClassState state);
#else
--- 747,756 ----
*** 924,933 ****
--- 900,913 ----
// Constructor
JNIid(klassOop holder, int offset, JNIid* next);
// Identifier lookup
JNIid* find(int offset);
+ bool find_local_field(fieldDescriptor* fd) {
+ return instanceKlass::cast(holder())->find_local_field_from_offset(offset(), true, fd);
+ }
+
// Garbage collection support
oop* holder_addr() { return (oop*)&_holder; }
void oops_do(OopClosure* f);
static void deallocate(JNIid* id);
// Debugging
src/share/vm/oops/instanceKlass.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File