hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
changeset 8725 8c1e3dd5fe1b
parent 7662 5f31baaff55b
child 8878 a6283814032c
equal deleted inserted replaced
8724:693c6b883b54 8725:8c1e3dd5fe1b
     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                                      }