--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZAddressRangeMapForPageTable.java 2018-01-13 12:14:30.562602317 +0900 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZAddressRangeMapForPageTable.java 2018-01-13 12:14:30.297601599 +0900 @@ -31,10 +31,10 @@ import sun.jvm.hotspot.types.Type; import sun.jvm.hotspot.types.TypeDataBase; -class ZAddressRangeMapForPageTable extends VMObject { +class ZAddressRangeMapForPageTable extends VMObject { private static AddressField mapField; - private static long AddressRangeShift = ZGlobals.ZPageSizeMinShift; + private static int ZPageSizeMinShift; static { VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase())); @@ -44,6 +44,7 @@ Type type = db.lookupType("ZAddressRangeMapForPageTable"); mapField = type.getAddressField("_map"); + ZPageSizeMinShift = db.lookupIntConstant("ZPageSizeMinShift").intValue(); } public ZAddressRangeMapForPageTable(Address addr) { @@ -55,7 +56,7 @@ } private long index_for_addr(Address addr) { - long index = ZAddress.offset(addr) >> AddressRangeShift; + long index = ZAddress.offset(addr).asLongValue() >> ZPageSizeMinShift; return index; }