comparison agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @ 2376:c7f3d0b4570f

7017732: move static fields into Class to prepare for perm gen removal Reviewed-by: kvn, coleenp, twisti, stefank
author never
date Fri, 18 Mar 2011 16:00:34 -0700
parents 0a8e0d4345b3
children 63997f575155
comparison
equal deleted inserted replaced
2375:d673ef06fe96 2376:c7f3d0b4570f
1 /* 1 /*
2 * Copyright (c) 2000, 2010, 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.
837 } 837 }
838 return sysProps; 838 return sysProps;
839 } 839 }
840 840
841 private void readSystemProperties() { 841 private void readSystemProperties() {
842 InstanceKlass systemKls = getSystemDictionary().getSystemKlass(); 842 final InstanceKlass systemKls = getSystemDictionary().getSystemKlass();
843 systemKls.iterate(new DefaultOopVisitor() { 843 systemKls.iterate(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(getObj())); 848 sysProps = (Properties) objReader.readObject(field.getValue(systemKls.getJavaMirror()));
849 } catch (Exception e) { 849 } catch (Exception e) {
850 if (Assert.ASSERTS_ENABLED) { 850 if (Assert.ASSERTS_ENABLED) {
851 e.printStackTrace(); 851 e.printStackTrace();
852 } 852 }
853 } 853 }