agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Fri Sep  9 14:15:59 2011
--- new/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Fri Sep  9 14:15:59 2011

*** 133,148 **** --- 133,150 ---- public static final class Flag { private String type; private String name; private Address addr; private String kind; + private int origin; ! private Flag(String type, String name, Address addr, String kind, int origin) { this.type = type; this.name = name; this.addr = addr; this.kind = kind; + this.origin = origin; } public String getType() { return type; }
*** 157,166 **** --- 159,172 ---- public String getKind() { return kind; } + public int getOrigin() { + return origin; + } + public boolean isBool() { return type.equals("bool"); } public boolean getBool() {
*** 802,812 **** --- 808,817 ---- } private void readCommandLineFlags() { // get command line flags TypeDataBase db = getTypeDataBase(); try { Type flagType = db.lookupType("Flag"); int numFlags = (int) flagType.getCIntegerField("numFlags").getValue(); // NOTE: last flag contains null values. commandLineFlags = new Flag[numFlags - 1];
*** 814,833 **** --- 819,840 ---- AddressField typeFld = flagType.getAddressField("type"); AddressField nameFld = flagType.getAddressField("name"); AddressField addrFld = flagType.getAddressField("addr"); AddressField kindFld = flagType.getAddressField("kind"); + CIntField originFld = new CIntField(flagType.getCIntegerField("origin"), 0); long flagSize = flagType.getSize(); // sizeof(Flag) // NOTE: last flag contains null values. for (int f = 0; f < numFlags - 1; f++) { String type = CStringUtilities.getString(typeFld.getValue(flagAddr)); String name = CStringUtilities.getString(nameFld.getValue(flagAddr)); Address addr = addrFld.getValue(flagAddr); String kind = CStringUtilities.getString(kindFld.getValue(flagAddr)); ! commandLineFlags[f] = new Flag(type, name, addr, kind); ! int origin = (int)originFld.getValue(flagAddr); + commandLineFlags[f] = new Flag(type, name, addr, kind, origin); flagAddr = flagAddr.addOffsetTo(flagSize); } // sort flags by name Arrays.sort(commandLineFlags, new Comparator() {
*** 835,848 **** --- 842,852 ---- Flag f1 = (Flag) o1; Flag f2 = (Flag) o2; return f1.getName().compareTo(f2.getName()); } }); } catch (Exception exp) { // ignore. may be older version. command line flags not available. } } public String getSystemProperty(String key) { Properties props = getSystemProperties(); return (props != null)? props.getProperty(key) : null; }

agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File