comparison agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeDisassembler.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 136b78722a08
children
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 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.
136 if (Assert.ASSERTS_ENABLED) { 136 if (Assert.ASSERTS_ENABLED) {
137 Assert.that(false, "Bytecode class without proper constructor!"); 137 Assert.that(false, "Bytecode class without proper constructor!");
138 } 138 }
139 } 139 }
140 140
141 Object bytecodeObj = null; 141 Bytecode bytecodeObj = null;
142 try { 142 try {
143 bytecodeObj = cstr.newInstance(new Object[] { method, new Integer(bci) }); 143 bytecodeObj = (Bytecode)cstr.newInstance(new Object[] { method, new Integer(bci) });
144 } catch (Exception exp) { 144 } catch (Exception exp) {
145 if (Assert.ASSERTS_ENABLED) { 145 if (Assert.ASSERTS_ENABLED) {
146 Assert.that(false, "Bytecode instance of class " 146 Assert.that(false, "Bytecode instance of class "
147 + clazz.getName() + " can not be created!"); 147 + clazz.getName() + " can not be created!");
148 } 148 }
151 if (stream.isWide()) { 151 if (stream.isWide()) {
152 visitor.visit(new Bytecode(method, bci - 1)); 152 visitor.visit(new Bytecode(method, bci - 1));
153 } 153 }
154 154
155 try { 155 try {
156 visitor.visit((Bytecode) bytecodeObj); 156 visitor.visit(bytecodeObj);
157 } catch(ClassCastException castfail) { 157 } catch(ClassCastException castfail) {
158 if (Assert.ASSERTS_ENABLED) { 158 castfail.printStackTrace();
159 Assert.that(false, clazz.getName() + " is not derived from Bytecode!"); 159 System.err.println(method.getAddress() + " " + bci);
160 }
161 } 160 }
162 } 161 }
163 162
164 visitor.epilogue(); 163 visitor.epilogue();
165 } 164 }