comparison agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java @ 2378:924777755fad

6962930: make the string table size configurable Reviewed-by: never, phh, stefank, kamg, dholmes, coleenp
author jcoomes
date Mon, 21 Mar 2011 18:38:00 -0700
parents 3582bf76420e
children 1d1603768966
comparison
equal deleted inserted replaced
2377:57552dca1708 2378:924777755fad
42 } 42 }
43 43
44 private static synchronized void initialize(TypeDataBase db) { 44 private static synchronized void initialize(TypeDataBase db) {
45 Type type = db.lookupType("StringTable"); 45 Type type = db.lookupType("StringTable");
46 theTableField = type.getAddressField("_the_table"); 46 theTableField = type.getAddressField("_the_table");
47 stringTableSize = db.lookupIntConstant("StringTable::string_table_size").intValue();
48 } 47 }
49 48
50 // Fields 49 // Fields
51 private static AddressField theTableField; 50 private static AddressField theTableField;
52 private static int stringTableSize;
53 51
54 // Accessors 52 // Accessors
55 public static StringTable getTheTable() { 53 public static StringTable getTheTable() {
56 Address tmp = theTableField.getValue(); 54 Address tmp = theTableField.getValue();
57 return (StringTable) VMObjectFactory.newObject(StringTable.class, tmp); 55 return (StringTable) VMObjectFactory.newObject(StringTable.class, tmp);
58 }
59
60 public static int getStringTableSize() {
61 return stringTableSize;
62 } 56 }
63 57
64 public StringTable(Address addr) { 58 public StringTable(Address addr) {
65 super(addr); 59 super(addr);
66 } 60 }