comparison agent/src/share/classes/sun/jvm/hotspot/runtime/VM.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 c7f3d0b4570f
children 7588156f5cf9
comparison
equal deleted inserted replaced
2410:fe1dbd98e18f 2411:63997f575155
837 } 837 }
838 return sysProps; 838 return sysProps;
839 } 839 }
840 840
841 private void readSystemProperties() { 841 private void readSystemProperties() {
842 final InstanceKlass systemKls = getSystemDictionary().getSystemKlass(); 842 final InstanceKlass systemKls = getSystemDictionary().getSystemKlass();
843 systemKls.iterate(new DefaultOopVisitor() { 843 systemKls.iterateStaticFields(new DefaultOopVisitor() {
844 ObjectReader objReader = new ObjectReader(); 844 ObjectReader objReader = new ObjectReader();
845 public void doOop(sun.jvm.hotspot.oops.OopField field, boolean isVMField) { 845 public void doOop(sun.jvm.hotspot.oops.OopField field, boolean isVMField) {
846 if (field.getID().getName().equals("props")) { 846 if (field.getID().getName().equals("props")) {
847 try { 847 try {
848 sysProps = (Properties) objReader.readObject(field.getValue(systemKls.getJavaMirror())); 848 sysProps = (Properties) objReader.readObject(field.getValue(getObj()));
849 } catch (Exception e) { 849 } catch (Exception e) {
850 if (Assert.ASSERTS_ENABLED) { 850 e.printStackTrace();
851 e.printStackTrace(); 851 }
852 } 852 }
853 } 853 }
854 } 854 });
855 }
856 }, false);
857 } 855 }
858 } 856 }