comparison agent/src/share/classes/sun/jvm/hotspot/utilities/HeapGXLWriter.java @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 63997f575155
children 6bd680e9ea35
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2004, 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.
177 // write object-size as an attribute 177 // write object-size as an attribute
178 long sizeInBytes = reflectedType.getLayoutHelper(); 178 long sizeInBytes = reflectedType.getLayoutHelper();
179 writeAttribute("object-size", "int", 179 writeAttribute("object-size", "int",
180 Long.toString(sizeInBytes)); 180 Long.toString(sizeInBytes));
181 // write static fields of this class. 181 // write static fields of this class.
182 writeObjectFields(reflectedType); 182 writeObjectFields((InstanceKlass)reflectedType);
183 } 183 }
184 } 184 }
185 out.println("</node>"); 185 out.println("</node>");
186 186
187 // write edges for super class and direct interfaces 187 // write edges for super class and direct interfaces
191 null : superType.getJavaMirror(); 191 null : superType.getJavaMirror();
192 writeEdge(instance, superMirror, "extends"); 192 writeEdge(instance, superMirror, "extends");
193 if (isInstanceKlass) { 193 if (isInstanceKlass) {
194 // write edges for directly implemented interfaces 194 // write edges for directly implemented interfaces
195 InstanceKlass ik = (InstanceKlass) reflectedType; 195 InstanceKlass ik = (InstanceKlass) reflectedType;
196 ObjArray interfaces = ik.getLocalInterfaces(); 196 KlassArray interfaces = ik.getLocalInterfaces();
197 final int len = (int) interfaces.getLength(); 197 final int len = interfaces.length();
198 for (int i = 0; i < len; i++) { 198 for (int i = 0; i < len; i++) {
199 Klass k = (Klass) interfaces.getObjAt(i); 199 Klass k = interfaces.getAt(i);
200 writeEdge(instance, k.getJavaMirror(), "implements"); 200 writeEdge(instance, k.getJavaMirror(), "implements");
201 } 201 }
202 202
203 // write loader 203 // write loader
204 Oop loader = ik.getClassLoader(); 204 Oop loader = ik.getClassLoader();