提交 f8aa0456 编写于 作者: T twisti

8024760: add more types, fields and constants to VMStructs

Reviewed-by: kvn, coleenp
上级 22b16f3b
...@@ -1213,6 +1213,7 @@ public class CommandProcessor { ...@@ -1213,6 +1213,7 @@ public class CommandProcessor {
} }
HotSpotTypeDataBase db = (HotSpotTypeDataBase)agent.getTypeDataBase(); HotSpotTypeDataBase db = (HotSpotTypeDataBase)agent.getTypeDataBase();
if (t.countTokens() == 1) { if (t.countTokens() == 1) {
String name = t.nextToken();
out.println("intConstant " + name + " " + db.lookupIntConstant(name)); out.println("intConstant " + name + " " + db.lookupIntConstant(name));
} else if (t.countTokens() == 0) { } else if (t.countTokens() == 0) {
Iterator i = db.getIntConstants(); Iterator i = db.getIntConstants();
...@@ -1235,6 +1236,7 @@ public class CommandProcessor { ...@@ -1235,6 +1236,7 @@ public class CommandProcessor {
} }
HotSpotTypeDataBase db = (HotSpotTypeDataBase)agent.getTypeDataBase(); HotSpotTypeDataBase db = (HotSpotTypeDataBase)agent.getTypeDataBase();
if (t.countTokens() == 1) { if (t.countTokens() == 1) {
String name = t.nextToken();
out.println("longConstant " + name + " " + db.lookupLongConstant(name)); out.println("longConstant " + name + " " + db.lookupLongConstant(name));
} else if (t.countTokens() == 0) { } else if (t.countTokens() == 0) {
Iterator i = db.getLongConstants(); Iterator i = db.getLongConstants();
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
class PtrQueueSet; class PtrQueueSet;
class PtrQueue VALUE_OBJ_CLASS_SPEC { class PtrQueue VALUE_OBJ_CLASS_SPEC {
friend class VMStructs;
protected: protected:
// The ptr queue set to which this queue belongs. // The ptr queue set to which this queue belongs.
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#define VM_STRUCTS_G1(nonstatic_field, static_field) \ #define VM_STRUCTS_G1(nonstatic_field, static_field) \
\ \
static_field(HeapRegion, GrainBytes, size_t) \ static_field(HeapRegion, GrainBytes, size_t) \
static_field(HeapRegion, LogOfHRGrainBytes, int) \
\ \
nonstatic_field(HeapRegionSeq, _regions, HeapRegion**) \ nonstatic_field(HeapRegionSeq, _regions, HeapRegion**) \
nonstatic_field(HeapRegionSeq, _length, uint) \ nonstatic_field(HeapRegionSeq, _length, uint) \
......
...@@ -602,7 +602,7 @@ oop Universe::gen_out_of_memory_error(oop default_err) { ...@@ -602,7 +602,7 @@ oop Universe::gen_out_of_memory_error(oop default_err) {
} }
} }
static intptr_t non_oop_bits = 0; intptr_t Universe::_non_oop_bits = 0;
void* Universe::non_oop_word() { void* Universe::non_oop_word() {
// Neither the high bits nor the low bits of this value is allowed // Neither the high bits nor the low bits of this value is allowed
...@@ -616,11 +616,11 @@ void* Universe::non_oop_word() { ...@@ -616,11 +616,11 @@ void* Universe::non_oop_word() {
// Using the OS-supplied non-memory-address word (usually 0 or -1) // Using the OS-supplied non-memory-address word (usually 0 or -1)
// will take care of the high bits, however many there are. // will take care of the high bits, however many there are.
if (non_oop_bits == 0) { if (_non_oop_bits == 0) {
non_oop_bits = (intptr_t)os::non_memory_address_word() | 1; _non_oop_bits = (intptr_t)os::non_memory_address_word() | 1;
} }
return (void*)non_oop_bits; return (void*)_non_oop_bits;
} }
jint universe_init() { jint universe_init() {
......
...@@ -179,6 +179,8 @@ class Universe: AllStatic { ...@@ -179,6 +179,8 @@ class Universe: AllStatic {
// The particular choice of collected heap. // The particular choice of collected heap.
static CollectedHeap* _collectedHeap; static CollectedHeap* _collectedHeap;
static intptr_t _non_oop_bits;
// For UseCompressedOops. // For UseCompressedOops.
static struct NarrowPtrStruct _narrow_oop; static struct NarrowPtrStruct _narrow_oop;
// For UseCompressedKlassPointers. // For UseCompressedKlassPointers.
......
...@@ -150,6 +150,8 @@ class klassVtable : public ResourceObj { ...@@ -150,6 +150,8 @@ class klassVtable : public ResourceObj {
// from_compiled_code_entry_point -> nmethod entry point // from_compiled_code_entry_point -> nmethod entry point
// from_interpreter_entry_point -> i2cadapter // from_interpreter_entry_point -> i2cadapter
class vtableEntry VALUE_OBJ_CLASS_SPEC { class vtableEntry VALUE_OBJ_CLASS_SPEC {
friend class VMStructs;
public: public:
// size in words // size in words
static int size() { static int size() {
......
...@@ -72,6 +72,8 @@ class ProfileData; ...@@ -72,6 +72,8 @@ class ProfileData;
// //
// Overlay for generic profiling data. // Overlay for generic profiling data.
class DataLayout VALUE_OBJ_CLASS_SPEC { class DataLayout VALUE_OBJ_CLASS_SPEC {
friend class VMStructs;
private: private:
// Every data layout begins with a header. This header // Every data layout begins with a header. This header
// contains a tag, which is used to indicate the size/layout // contains a tag, which is used to indicate the size/layout
......
...@@ -91,6 +91,8 @@ const bool ExecMem = true; ...@@ -91,6 +91,8 @@ const bool ExecMem = true;
typedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread); typedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread);
class os: AllStatic { class os: AllStatic {
friend class VMStructs;
public: public:
enum { page_sizes_max = 9 }; // Size of _page_sizes array (8 plus a sentinel) enum { page_sizes_max = 9 }; // Size of _page_sizes array (8 plus a sentinel)
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册