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

agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java

Print this page

        

*** 132,150 **** // command line flags supplied to VM - see struct Flag in globals.hpp 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; } --- 132,148 ---- // command line flags supplied to VM - see struct Flag in globals.hpp public static final class Flag { private String type; private String name; private Address addr; ! private int flags; ! private Flag(String type, String name, Address addr, int flags) { this.type = type; this.name = name; this.addr = addr; ! this.flags = flags; } public String getType() { return type; }
*** 155,182 **** public Address getAddress() { return addr; } - public String getKind() { - return kind; - } - public int getOrigin() { ! return origin; } public boolean isBool() { return type.equals("bool"); } public boolean getBool() { if (Assert.ASSERTS_ENABLED) { Assert.that(isBool(), "not a bool flag!"); } ! return addr.getCIntegerAt(0, boolType.getSize(), boolType.isUnsigned()) ! != 0; } public boolean isIntx() { return type.equals("intx"); } --- 153,175 ---- public Address getAddress() { return addr; } public int getOrigin() { ! return flags & 0xF; // XXX can we get the mask bits from somewhere? } public boolean isBool() { return type.equals("bool"); } public boolean getBool() { if (Assert.ASSERTS_ENABLED) { Assert.that(isBool(), "not a bool flag!"); } ! return addr.getCIntegerAt(0, boolType.getSize(), boolType.isUnsigned()) != 0; } public boolean isIntx() { return type.equals("intx"); }
*** 841,866 **** // NOTE: last flag contains null values. commandLineFlags = new Flag[numFlags - 1]; Address flagAddr = flagType.getAddressField("flags").getValue(); ! 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)); ! 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() { --- 834,857 ---- // NOTE: last flag contains null values. commandLineFlags = new Flag[numFlags - 1]; Address flagAddr = flagType.getAddressField("flags").getValue(); ! AddressField typeFld = flagType.getAddressField("_type"); ! AddressField nameFld = flagType.getAddressField("_name"); ! AddressField addrFld = flagType.getAddressField("_addr"); ! CIntField flagsFld = new CIntField(flagType.getCIntegerField("_flags"), 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); ! int flags = (int)flagsFld.getValue(flagAddr); ! commandLineFlags[f] = new Flag(type, name, addr, flags); flagAddr = flagAddr.addOffsetTo(flagSize); } // sort flags by name Arrays.sort(commandLineFlags, new Comparator() {
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File