Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/memory/SystemDictionary.java @ 4864:b2cd0ee8f778
7114376: Make system dictionary hashtable bucket array size configurable
Summary: 7u4 new experimental flag -XX:PredictedClassLoadedCount=#
Reviewed-by: dholmes, phh, dcubed
author | acorn |
---|---|
date | Mon, 30 Jan 2012 23:27:30 -0500 |
parents | 7588156f5cf9 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
4863:d96c130c9399 | 4864:b2cd0ee8f778 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
34 private static AddressField dictionaryField; | 34 private static AddressField dictionaryField; |
35 private static AddressField sharedDictionaryField; | 35 private static AddressField sharedDictionaryField; |
36 private static AddressField placeholdersField; | 36 private static AddressField placeholdersField; |
37 private static AddressField loaderConstraintTableField; | 37 private static AddressField loaderConstraintTableField; |
38 private static sun.jvm.hotspot.types.OopField javaSystemLoaderField; | 38 private static sun.jvm.hotspot.types.OopField javaSystemLoaderField; |
39 private static int nofBuckets; | |
40 | 39 |
41 private static sun.jvm.hotspot.types.OopField objectKlassField; | 40 private static sun.jvm.hotspot.types.OopField objectKlassField; |
42 private static sun.jvm.hotspot.types.OopField classLoaderKlassField; | 41 private static sun.jvm.hotspot.types.OopField classLoaderKlassField; |
43 private static sun.jvm.hotspot.types.OopField stringKlassField; | 42 private static sun.jvm.hotspot.types.OopField stringKlassField; |
44 private static sun.jvm.hotspot.types.OopField systemKlassField; | 43 private static sun.jvm.hotspot.types.OopField systemKlassField; |
60 dictionaryField = type.getAddressField("_dictionary"); | 59 dictionaryField = type.getAddressField("_dictionary"); |
61 sharedDictionaryField = type.getAddressField("_shared_dictionary"); | 60 sharedDictionaryField = type.getAddressField("_shared_dictionary"); |
62 placeholdersField = type.getAddressField("_placeholders"); | 61 placeholdersField = type.getAddressField("_placeholders"); |
63 loaderConstraintTableField = type.getAddressField("_loader_constraints"); | 62 loaderConstraintTableField = type.getAddressField("_loader_constraints"); |
64 javaSystemLoaderField = type.getOopField("_java_system_loader"); | 63 javaSystemLoaderField = type.getOopField("_java_system_loader"); |
65 nofBuckets = db.lookupIntConstant("SystemDictionary::_nof_buckets").intValue(); | |
66 | 64 |
67 objectKlassField = type.getOopField(WK_KLASS("Object_klass")); | 65 objectKlassField = type.getOopField(WK_KLASS("Object_klass")); |
68 classLoaderKlassField = type.getOopField(WK_KLASS("ClassLoader_klass")); | 66 classLoaderKlassField = type.getOopField(WK_KLASS("ClassLoader_klass")); |
69 stringKlassField = type.getOopField(WK_KLASS("String_klass")); | 67 stringKlassField = type.getOopField(WK_KLASS("String_klass")); |
70 systemKlassField = type.getOopField(WK_KLASS("System_klass")); | 68 systemKlassField = type.getOopField(WK_KLASS("System_klass")); |
138 null, null); | 136 null, null); |
139 } | 137 } |
140 | 138 |
141 public static Oop javaSystemLoader() { | 139 public static Oop javaSystemLoader() { |
142 return newOop(javaSystemLoaderField.getValue()); | 140 return newOop(javaSystemLoaderField.getValue()); |
143 } | |
144 | |
145 public static int getNumOfBuckets() { | |
146 return nofBuckets; | |
147 } | 141 } |
148 | 142 |
149 private static Oop newOop(OopHandle handle) { | 143 private static Oop newOop(OopHandle handle) { |
150 return VM.getVM().getObjectHeap().newOop(handle); | 144 return VM.getVM().getObjectHeap().newOop(handle); |
151 } | 145 } |