Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java @ 2411:63997f575155
7031614: jmap -permstat fails with java.lang.InternalError in sun.jvm.hotspot.oops.OopField.getValue
Reviewed-by: kvn, dcubed
author | never |
---|---|
date | Wed, 30 Mar 2011 07:47:19 -0700 |
parents | 3582bf76420e |
children | 4f93f0d00802 |
comparison
equal
deleted
inserted
replaced
2410:fe1dbd98e18f | 2411:63997f575155 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2011, 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. |
360 if (klass.equals(constantPoolCacheKlassHandle)) return new ConstantPoolCache(handle, this); | 360 if (klass.equals(constantPoolCacheKlassHandle)) return new ConstantPoolCache(handle, this); |
361 if (!VM.getVM().isCore()) { | 361 if (!VM.getVM().isCore()) { |
362 if (klass.equals(compiledICHolderKlassHandle)) return new CompiledICHolder(handle, this); | 362 if (klass.equals(compiledICHolderKlassHandle)) return new CompiledICHolder(handle, this); |
363 if (klass.equals(methodDataKlassHandle)) return new MethodData(handle, this); | 363 if (klass.equals(methodDataKlassHandle)) return new MethodData(handle, this); |
364 } | 364 } |
365 if (klass.equals(instanceKlassKlassHandle)) return new InstanceKlass(handle, this); | 365 if (klass.equals(instanceKlassKlassHandle)) { |
366 InstanceKlass ik = new InstanceKlass(handle, this); | |
367 if (ik.getName().asString().equals("java/lang/Class")) { | |
368 // We would normally do this using the vtable style | |
369 // lookup but since it's not used for these currently | |
370 // it's simpler to just check for the name. | |
371 return new InstanceMirrorKlass(handle, this); | |
372 } | |
373 return ik; | |
374 } | |
366 if (klass.equals(objArrayKlassKlassHandle)) return new ObjArrayKlass(handle, this); | 375 if (klass.equals(objArrayKlassKlassHandle)) return new ObjArrayKlass(handle, this); |
367 if (klass.equals(typeArrayKlassKlassHandle)) return new TypeArrayKlass(handle, this); | 376 if (klass.equals(typeArrayKlassKlassHandle)) return new TypeArrayKlass(handle, this); |
368 | 377 |
369 // Lastly check if obj.klass().klass() is on of the root objects | 378 // Lastly check if obj.klass().klass() is on of the root objects |
370 OopHandle klassKlass = Oop.getKlassForOopHandle(klass); | 379 OopHandle klassKlass = Oop.getKlassForOopHandle(klass); |