annotate agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaHeap.java @ 17524:89152779163c

Merge with jdk8-b132
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 11:59:32 +0200
parents c18cbe5936b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
2 * Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 package sun.jvm.hotspot.utilities.soql;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 import java.util.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
28 import javax.script.ScriptException;
a61af66fc99e Initial load
duke
parents:
diff changeset
29 import sun.jvm.hotspot.debugger.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
30 import sun.jvm.hotspot.memory.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
31 import sun.jvm.hotspot.oops.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
32 import sun.jvm.hotspot.runtime.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
33 import sun.jvm.hotspot.utilities.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
34 import java.lang.reflect.Method;
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 public class JSJavaHeap extends DefaultScriptObject {
a61af66fc99e Initial load
duke
parents:
diff changeset
37 private static final int FIELD_CAPACITY = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
38 private static final int FIELD_USED = 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
39 private static final int FIELD_FOR_EACH_OBJECT = 2;
a61af66fc99e Initial load
duke
parents:
diff changeset
40 private static final int FIELD_FOR_EACH_CLASS = 3;
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 private static final int FIELD_UNDEFINED = -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 public JSJavaHeap(JSJavaFactory fac) {
a61af66fc99e Initial load
duke
parents:
diff changeset
45 this.factory = fac;
a61af66fc99e Initial load
duke
parents:
diff changeset
46 }
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48 public Object get(String name) {
a61af66fc99e Initial load
duke
parents:
diff changeset
49 int fieldID = getFieldID(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
50 switch (fieldID) {
a61af66fc99e Initial load
duke
parents:
diff changeset
51 case FIELD_CAPACITY:
a61af66fc99e Initial load
duke
parents:
diff changeset
52 return new Long(getCapacity());
a61af66fc99e Initial load
duke
parents:
diff changeset
53 case FIELD_USED:
a61af66fc99e Initial load
duke
parents:
diff changeset
54 return new Long(getUsed());
a61af66fc99e Initial load
duke
parents:
diff changeset
55 case FIELD_FOR_EACH_OBJECT:
a61af66fc99e Initial load
duke
parents:
diff changeset
56 return new MethodCallable(this, forEachObjectMethod);
a61af66fc99e Initial load
duke
parents:
diff changeset
57 case FIELD_FOR_EACH_CLASS:
a61af66fc99e Initial load
duke
parents:
diff changeset
58 return new MethodCallable(this, forEachClassMethod);
a61af66fc99e Initial load
duke
parents:
diff changeset
59 case FIELD_UNDEFINED:
a61af66fc99e Initial load
duke
parents:
diff changeset
60 default:
a61af66fc99e Initial load
duke
parents:
diff changeset
61 return super.get(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
62 }
a61af66fc99e Initial load
duke
parents:
diff changeset
63 }
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 public Object[] getIds() {
a61af66fc99e Initial load
duke
parents:
diff changeset
66 Object[] superIds = super.getIds();
a61af66fc99e Initial load
duke
parents:
diff changeset
67 Object[] tmp = fields.keySet().toArray();
a61af66fc99e Initial load
duke
parents:
diff changeset
68 Object[] res = new Object[superIds.length + tmp.length];
a61af66fc99e Initial load
duke
parents:
diff changeset
69 System.arraycopy(tmp, 0, res, 0, tmp.length);
a61af66fc99e Initial load
duke
parents:
diff changeset
70 System.arraycopy(superIds, 0, res, tmp.length, superIds.length);
a61af66fc99e Initial load
duke
parents:
diff changeset
71 return res;
a61af66fc99e Initial load
duke
parents:
diff changeset
72 }
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 public boolean has(String name) {
a61af66fc99e Initial load
duke
parents:
diff changeset
75 if (getFieldID(name) != FIELD_UNDEFINED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 return true;
a61af66fc99e Initial load
duke
parents:
diff changeset
77 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
78 return super.has(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
79 }
a61af66fc99e Initial load
duke
parents:
diff changeset
80 }
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 public void put(String name, Object value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
83 if (getFieldID(name) == FIELD_UNDEFINED) {
a61af66fc99e Initial load
duke
parents:
diff changeset
84 super.put(name, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
85 }
a61af66fc99e Initial load
duke
parents:
diff changeset
86 }
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 public void forEachObject(Object[] args) {
a61af66fc99e Initial load
duke
parents:
diff changeset
89 boolean subtypes = true;
a61af66fc99e Initial load
duke
parents:
diff changeset
90 Klass kls = null;
a61af66fc99e Initial load
duke
parents:
diff changeset
91 Callable func = null;
a61af66fc99e Initial load
duke
parents:
diff changeset
92 switch (args.length) {
a61af66fc99e Initial load
duke
parents:
diff changeset
93 case 3: {
a61af66fc99e Initial load
duke
parents:
diff changeset
94 Object b = args[2];
a61af66fc99e Initial load
duke
parents:
diff changeset
95 if (b != null && b instanceof Boolean) {
a61af66fc99e Initial load
duke
parents:
diff changeset
96 subtypes = ((Boolean)b).booleanValue();
a61af66fc99e Initial load
duke
parents:
diff changeset
97 }
a61af66fc99e Initial load
duke
parents:
diff changeset
98 }
a61af66fc99e Initial load
duke
parents:
diff changeset
99 case 2: {
a61af66fc99e Initial load
duke
parents:
diff changeset
100 Object k = args[1];
a61af66fc99e Initial load
duke
parents:
diff changeset
101 if (k == null) return;
a61af66fc99e Initial load
duke
parents:
diff changeset
102 if (k instanceof JSJavaKlass) {
a61af66fc99e Initial load
duke
parents:
diff changeset
103 kls = ((JSJavaKlass)k).getKlass();
a61af66fc99e Initial load
duke
parents:
diff changeset
104 } else if (k instanceof String) {
a61af66fc99e Initial load
duke
parents:
diff changeset
105 kls = SystemDictionaryHelper.findInstanceKlass((String)k);
a61af66fc99e Initial load
duke
parents:
diff changeset
106 if (kls == null) return;
a61af66fc99e Initial load
duke
parents:
diff changeset
107 }
a61af66fc99e Initial load
duke
parents:
diff changeset
108 }
a61af66fc99e Initial load
duke
parents:
diff changeset
109 case 1: {
a61af66fc99e Initial load
duke
parents:
diff changeset
110 Object f = args[0];
a61af66fc99e Initial load
duke
parents:
diff changeset
111 if (f != null && f instanceof Callable) {
a61af66fc99e Initial load
duke
parents:
diff changeset
112 func = (Callable) f;
a61af66fc99e Initial load
duke
parents:
diff changeset
113 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
114 // unknown target - just return
a61af66fc99e Initial load
duke
parents:
diff changeset
115 return ;
a61af66fc99e Initial load
duke
parents:
diff changeset
116 }
a61af66fc99e Initial load
duke
parents:
diff changeset
117 }
a61af66fc99e Initial load
duke
parents:
diff changeset
118 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
119
a61af66fc99e Initial load
duke
parents:
diff changeset
120 default:
a61af66fc99e Initial load
duke
parents:
diff changeset
121 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
122 }
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 final Callable finalFunc = func;
a61af66fc99e Initial load
duke
parents:
diff changeset
125 HeapVisitor visitor = new DefaultHeapVisitor() {
a61af66fc99e Initial load
duke
parents:
diff changeset
126 public boolean doObj(Oop oop) {
a61af66fc99e Initial load
duke
parents:
diff changeset
127 JSJavaObject jo = factory.newJSJavaObject(oop);
a61af66fc99e Initial load
duke
parents:
diff changeset
128 if (jo != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
129 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
130 finalFunc.call(new Object[] { jo });
a61af66fc99e Initial load
duke
parents:
diff changeset
131 } catch (ScriptException exp) {
a61af66fc99e Initial load
duke
parents:
diff changeset
132 throw new RuntimeException(exp);
a61af66fc99e Initial load
duke
parents:
diff changeset
133 }
a61af66fc99e Initial load
duke
parents:
diff changeset
134 }
a61af66fc99e Initial load
duke
parents:
diff changeset
135 return false;
a61af66fc99e Initial load
duke
parents:
diff changeset
136 }
a61af66fc99e Initial load
duke
parents:
diff changeset
137 };
a61af66fc99e Initial load
duke
parents:
diff changeset
138 ObjectHeap heap = VM.getVM().getObjectHeap();
a61af66fc99e Initial load
duke
parents:
diff changeset
139 if (kls == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
140 kls = SystemDictionaryHelper.findInstanceKlass("java.lang.Object");
a61af66fc99e Initial load
duke
parents:
diff changeset
141 }
a61af66fc99e Initial load
duke
parents:
diff changeset
142 heap.iterateObjectsOfKlass(visitor, kls, subtypes);
a61af66fc99e Initial load
duke
parents:
diff changeset
143 }
a61af66fc99e Initial load
duke
parents:
diff changeset
144
a61af66fc99e Initial load
duke
parents:
diff changeset
145 public void forEachClass(Object[] args) {
a61af66fc99e Initial load
duke
parents:
diff changeset
146 boolean withLoader = false;
a61af66fc99e Initial load
duke
parents:
diff changeset
147 Callable func = null;
a61af66fc99e Initial load
duke
parents:
diff changeset
148 switch (args.length) {
a61af66fc99e Initial load
duke
parents:
diff changeset
149 case 2: {
a61af66fc99e Initial load
duke
parents:
diff changeset
150 Object b = args[1];
a61af66fc99e Initial load
duke
parents:
diff changeset
151 if (b instanceof Boolean) {
a61af66fc99e Initial load
duke
parents:
diff changeset
152 withLoader = ((Boolean)b).booleanValue();
a61af66fc99e Initial load
duke
parents:
diff changeset
153 }
a61af66fc99e Initial load
duke
parents:
diff changeset
154 }
a61af66fc99e Initial load
duke
parents:
diff changeset
155 case 1: {
a61af66fc99e Initial load
duke
parents:
diff changeset
156 Object f = args[0];
a61af66fc99e Initial load
duke
parents:
diff changeset
157 if (f instanceof Callable) {
a61af66fc99e Initial load
duke
parents:
diff changeset
158 func = (Callable) f;
a61af66fc99e Initial load
duke
parents:
diff changeset
159 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
160 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
161 }
a61af66fc99e Initial load
duke
parents:
diff changeset
162 }
a61af66fc99e Initial load
duke
parents:
diff changeset
163 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
164 default:
a61af66fc99e Initial load
duke
parents:
diff changeset
165 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
166 }
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 final Callable finalFunc = func;
a61af66fc99e Initial load
duke
parents:
diff changeset
169 SystemDictionary sysDict = VM.getVM().getSystemDictionary();
a61af66fc99e Initial load
duke
parents:
diff changeset
170 if (withLoader) {
a61af66fc99e Initial load
duke
parents:
diff changeset
171 sysDict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() {
a61af66fc99e Initial load
duke
parents:
diff changeset
172 public void visit(Klass kls, Oop loader) {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 JSJavaKlass jk = factory.newJSJavaKlass(kls);
a61af66fc99e Initial load
duke
parents:
diff changeset
174 if (jk == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
175 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
176 }
a61af66fc99e Initial load
duke
parents:
diff changeset
177 JSJavaObject k = jk.getJSJavaClass();
a61af66fc99e Initial load
duke
parents:
diff changeset
178 JSJavaObject l = factory.newJSJavaObject(loader);
a61af66fc99e Initial load
duke
parents:
diff changeset
179 if (k != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
180 if (k != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
181 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
182 finalFunc.call(new Object[] { k, l });
a61af66fc99e Initial load
duke
parents:
diff changeset
183 } catch (ScriptException exp) {
a61af66fc99e Initial load
duke
parents:
diff changeset
184 throw new RuntimeException(exp);
a61af66fc99e Initial load
duke
parents:
diff changeset
185 }
a61af66fc99e Initial load
duke
parents:
diff changeset
186 }
a61af66fc99e Initial load
duke
parents:
diff changeset
187 }
a61af66fc99e Initial load
duke
parents:
diff changeset
188 }
a61af66fc99e Initial load
duke
parents:
diff changeset
189 });
a61af66fc99e Initial load
duke
parents:
diff changeset
190
a61af66fc99e Initial load
duke
parents:
diff changeset
191 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
192 sysDict.classesDo(new SystemDictionary.ClassVisitor() {
a61af66fc99e Initial load
duke
parents:
diff changeset
193 public void visit(Klass kls) {
a61af66fc99e Initial load
duke
parents:
diff changeset
194 JSJavaKlass jk = factory.newJSJavaKlass(kls);
a61af66fc99e Initial load
duke
parents:
diff changeset
195 if (jk == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
196 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
197 }
a61af66fc99e Initial load
duke
parents:
diff changeset
198 JSJavaClass k = jk.getJSJavaClass();
a61af66fc99e Initial load
duke
parents:
diff changeset
199 if (k != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
200 if (k != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
201 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
202 finalFunc.call(new Object[] { k });
a61af66fc99e Initial load
duke
parents:
diff changeset
203 } catch (ScriptException exp) {
a61af66fc99e Initial load
duke
parents:
diff changeset
204 throw new RuntimeException(exp);
a61af66fc99e Initial load
duke
parents:
diff changeset
205 }
a61af66fc99e Initial load
duke
parents:
diff changeset
206 }
a61af66fc99e Initial load
duke
parents:
diff changeset
207 }
a61af66fc99e Initial load
duke
parents:
diff changeset
208 }
a61af66fc99e Initial load
duke
parents:
diff changeset
209 });
a61af66fc99e Initial load
duke
parents:
diff changeset
210 }
a61af66fc99e Initial load
duke
parents:
diff changeset
211 }
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 public String toString() {
a61af66fc99e Initial load
duke
parents:
diff changeset
214 StringBuffer buf = new StringBuffer();
a61af66fc99e Initial load
duke
parents:
diff changeset
215 buf.append("Java Heap (capacity=");
a61af66fc99e Initial load
duke
parents:
diff changeset
216 buf.append(getCapacity());
a61af66fc99e Initial load
duke
parents:
diff changeset
217 buf.append(", used=");
a61af66fc99e Initial load
duke
parents:
diff changeset
218 buf.append(getUsed());
a61af66fc99e Initial load
duke
parents:
diff changeset
219 buf.append(")");
a61af66fc99e Initial load
duke
parents:
diff changeset
220 return buf.toString();
a61af66fc99e Initial load
duke
parents:
diff changeset
221 }
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 //-- Internals only below this point
a61af66fc99e Initial load
duke
parents:
diff changeset
224 private static Map fields = new HashMap();
a61af66fc99e Initial load
duke
parents:
diff changeset
225 private static void addField(String name, int fieldId) {
a61af66fc99e Initial load
duke
parents:
diff changeset
226 fields.put(name, new Integer(fieldId));
a61af66fc99e Initial load
duke
parents:
diff changeset
227 }
a61af66fc99e Initial load
duke
parents:
diff changeset
228
a61af66fc99e Initial load
duke
parents:
diff changeset
229 private static int getFieldID(String name) {
a61af66fc99e Initial load
duke
parents:
diff changeset
230 Integer res = (Integer) fields.get(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
231 return (res != null)? res.intValue() : FIELD_UNDEFINED;
a61af66fc99e Initial load
duke
parents:
diff changeset
232 }
a61af66fc99e Initial load
duke
parents:
diff changeset
233
a61af66fc99e Initial load
duke
parents:
diff changeset
234 static {
a61af66fc99e Initial load
duke
parents:
diff changeset
235 addField("capacity", FIELD_CAPACITY);
a61af66fc99e Initial load
duke
parents:
diff changeset
236 addField("used", FIELD_USED);
a61af66fc99e Initial load
duke
parents:
diff changeset
237 addField("forEachObject", FIELD_FOR_EACH_OBJECT);
a61af66fc99e Initial load
duke
parents:
diff changeset
238 addField("forEachClass", FIELD_FOR_EACH_CLASS);
a61af66fc99e Initial load
duke
parents:
diff changeset
239 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
240 Class myClass = JSJavaHeap.class;
a61af66fc99e Initial load
duke
parents:
diff changeset
241 forEachObjectMethod = myClass.getMethod("forEachObject",
a61af66fc99e Initial load
duke
parents:
diff changeset
242 new Class[] { Object[].class });
a61af66fc99e Initial load
duke
parents:
diff changeset
243 forEachClassMethod = myClass.getMethod("forEachClass",
a61af66fc99e Initial load
duke
parents:
diff changeset
244 new Class[] {Object[].class });
a61af66fc99e Initial load
duke
parents:
diff changeset
245 } catch (RuntimeException re) {
a61af66fc99e Initial load
duke
parents:
diff changeset
246 throw re;
a61af66fc99e Initial load
duke
parents:
diff changeset
247 } catch (Exception exp) {
a61af66fc99e Initial load
duke
parents:
diff changeset
248 throw new RuntimeException(exp);
a61af66fc99e Initial load
duke
parents:
diff changeset
249 }
a61af66fc99e Initial load
duke
parents:
diff changeset
250 }
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252 private long getCapacity() {
a61af66fc99e Initial load
duke
parents:
diff changeset
253 return VM.getVM().getUniverse().heap().capacity();
a61af66fc99e Initial load
duke
parents:
diff changeset
254 }
a61af66fc99e Initial load
duke
parents:
diff changeset
255
a61af66fc99e Initial load
duke
parents:
diff changeset
256 private long getUsed() {
a61af66fc99e Initial load
duke
parents:
diff changeset
257 return VM.getVM().getUniverse().heap().used();
a61af66fc99e Initial load
duke
parents:
diff changeset
258 }
a61af66fc99e Initial load
duke
parents:
diff changeset
259
a61af66fc99e Initial load
duke
parents:
diff changeset
260 private final JSJavaFactory factory;
a61af66fc99e Initial load
duke
parents:
diff changeset
261 private static Method forEachObjectMethod;
a61af66fc99e Initial load
duke
parents:
diff changeset
262 private static Method forEachClassMethod;
a61af66fc99e Initial load
duke
parents:
diff changeset
263 }