# HG changeset patch # User stefank # Date 1427367649 0 # Node ID ddd5618b5804b59147772c81835f1adeaa540d29 # Parent 8c6fa07f086963c91a8d566f424115cd4baad5e1# Parent 2a1a74472bfdfe13a86878f3334b159fd3ee35de Merge diff -r 8c6fa07f0869 -r ddd5618b5804 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Thu Mar 26 11:28:19 2015 +0100 +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Thu Mar 26 11:00:49 2015 +0000 @@ -123,6 +123,7 @@ private static Type intxType; private static Type uintxType; + private static Type sizetType; private static CIntegerType boolType; private Boolean sharingEnabled; private Boolean compressedOopsEnabled; @@ -175,7 +176,7 @@ public long getIntx() { if (Assert.ASSERTS_ENABLED) { - Assert.that(isIntx(), "not a intx flag!"); + Assert.that(isIntx(), "not an intx flag!"); } return addr.getCIntegerAt(0, intxType.getSize(), false); } @@ -191,6 +192,17 @@ return addr.getCIntegerAt(0, uintxType.getSize(), true); } + public boolean isSizet() { + return type.equals("size_t"); + } + + public long getSizet() { + if (Assert.ASSERTS_ENABLED) { + Assert.that(isSizet(), "not a size_t flag!"); + } + return addr.getCIntegerAt(0, sizetType.getSize(), true); + } + public String getValue() { if (isBool()) { return new Boolean(getBool()).toString(); @@ -198,6 +210,8 @@ return new Long(getIntx()).toString(); } else if (isUIntx()) { return new Long(getUIntx()).toString(); + } else if (isSizet()) { + return new Long(getSizet()).toString(); } else { return null; } @@ -323,6 +337,7 @@ intxType = db.lookupType("intx"); uintxType = db.lookupType("uintx"); + sizetType = db.lookupType("size_t"); boolType = (CIntegerType) db.lookupType("bool"); minObjAlignmentInBytes = getObjectAlignmentInBytes();