comparison agent/src/share/classes/sun/jvm/hotspot/tools/soql/SOQL.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 e6b1331a51d2
children 38ea2efa32a7
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 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.
124 // just list all InstanceKlasses 124 // just list all InstanceKlasses
125 InstanceKlass[] klasses = SystemDictionaryHelper.getAllInstanceKlasses(); 125 InstanceKlass[] klasses = SystemDictionaryHelper.getAllInstanceKlasses();
126 for (int i = 0; i < klasses.length; i++) { 126 for (int i = 0; i < klasses.length; i++) {
127 out.print(klasses[i].getName().asString().replace('/', '.')); 127 out.print(klasses[i].getName().asString().replace('/', '.'));
128 out.print(" @"); 128 out.print(" @");
129 out.println(klasses[i].getHandle()); 129 out.println(klasses[i].getAddress());
130 } 130 }
131 } 131 }
132 132
133 protected void handleClass(String line) { 133 protected void handleClass(String line) {
134 StringTokenizer st = new StringTokenizer(line); 134 StringTokenizer st = new StringTokenizer(line);
148 out.print("\t"); 148 out.print("\t");
149 out.println(base.getName().asString().replace('/', '.')); 149 out.println(base.getName().asString().replace('/', '.'));
150 } 150 }
151 151
152 // list immediate fields only 152 // list immediate fields only
153 int numFields = klass.getJavaFieldsCount(); 153 U2Array fields = klass.getFields();
154 int numFields = (int) fields.length();
154 ConstantPool cp = klass.getConstants(); 155 ConstantPool cp = klass.getConstants();
155 out.println("fields"); 156 out.println("fields");
156 if (numFields != 0) { 157 if (numFields != 0) {
157 for (int f = 0; f < numFields; f++){ 158 for (int f = 0; f < numFields; f++){
158 Symbol f_name = klass.getFieldName(f); 159 Symbol f_name = klass.getFieldName(f);