8266531: ZAddress::address() should be removed from SA
Reviewed-by: cjplummer, stefank
This commit is contained in:
parent
e828a939a8
commit
476994aa37
src
hotspot/share/gc/z
jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z
test/hotspot/jtreg
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,6 +27,7 @@
|
||||
ZGlobalsForVMStructs::ZGlobalsForVMStructs() :
|
||||
_ZGlobalPhase(&ZGlobalPhase),
|
||||
_ZGlobalSeqNum(&ZGlobalSeqNum),
|
||||
_ZAddressOffsetMask(&ZAddressOffsetMask),
|
||||
_ZAddressGoodMask(&ZAddressGoodMask),
|
||||
_ZAddressBadMask(&ZAddressBadMask),
|
||||
_ZAddressWeakBadMask(&ZAddressWeakBadMask),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -45,6 +45,7 @@ public:
|
||||
|
||||
uint32_t* _ZGlobalSeqNum;
|
||||
|
||||
uintptr_t* _ZAddressOffsetMask;
|
||||
uintptr_t* _ZAddressGoodMask;
|
||||
uintptr_t* _ZAddressBadMask;
|
||||
uintptr_t* _ZAddressWeakBadMask;
|
||||
@ -60,6 +61,7 @@ typedef ZAttachedArray<ZForwarding, ZForwardingEntry> ZAttachedArrayForForwardin
|
||||
static_field(ZGlobalsForVMStructs, _instance_p, ZGlobalsForVMStructs*) \
|
||||
nonstatic_field(ZGlobalsForVMStructs, _ZGlobalPhase, uint32_t*) \
|
||||
nonstatic_field(ZGlobalsForVMStructs, _ZGlobalSeqNum, uint32_t*) \
|
||||
nonstatic_field(ZGlobalsForVMStructs, _ZAddressOffsetMask, uintptr_t*) \
|
||||
nonstatic_field(ZGlobalsForVMStructs, _ZAddressGoodMask, uintptr_t*) \
|
||||
nonstatic_field(ZGlobalsForVMStructs, _ZAddressBadMask, uintptr_t*) \
|
||||
nonstatic_field(ZGlobalsForVMStructs, _ZAddressWeakBadMask, uintptr_t*) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,7 +52,6 @@ public:
|
||||
static bool is_remapped(uintptr_t value);
|
||||
static bool is_in(uintptr_t value);
|
||||
|
||||
static uintptr_t address(uintptr_t value);
|
||||
static uintptr_t offset(uintptr_t value);
|
||||
static uintptr_t good(uintptr_t value);
|
||||
static uintptr_t good_or_null(uintptr_t value);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,15 +52,11 @@ class ZAddress {
|
||||
}
|
||||
|
||||
static long offset(Address address) {
|
||||
return as_long(address) & ZGlobals.ZAddressOffsetMask;
|
||||
}
|
||||
|
||||
static Address address(long value) {
|
||||
return ZUtils.longToAddress(value);
|
||||
return as_long(address) & ZGlobals.ZAddressOffsetMask();
|
||||
}
|
||||
|
||||
static Address good(Address value) {
|
||||
return address(offset(value) | ZGlobals.ZAddressGoodMask());
|
||||
return VM.getVM().getDebugger().newAddress(offset(value) | ZGlobals.ZAddressGoodMask());
|
||||
}
|
||||
|
||||
static Address good_or_null(Address value) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,7 +43,7 @@ public class ZExternalBitMap implements BitMapInterface {
|
||||
}
|
||||
|
||||
private ZPage getPage(long zOffset) {
|
||||
if (zOffset > ZGlobals.ZAddressOffsetMask) {
|
||||
if (zOffset > ZGlobals.ZAddressOffsetMask()) {
|
||||
throw new RuntimeException("Not a Z offset: " + zOffset);
|
||||
}
|
||||
|
||||
@ -78,8 +78,8 @@ public class ZExternalBitMap implements BitMapInterface {
|
||||
}
|
||||
|
||||
private long convertToZOffset(long offset) {
|
||||
long addr = ZGlobals.ZAddressSpaceStart + oopSize * offset;
|
||||
return addr & ZGlobals.ZAddressOffsetMask;
|
||||
long addr = oopSize * offset;
|
||||
return addr & ZGlobals.ZAddressOffsetMask();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,12 +55,8 @@ public class ZGlobals {
|
||||
|
||||
// Pointer part of address
|
||||
public static long ZAddressOffsetBits;
|
||||
public static long ZAddressOffsetMask;
|
||||
public static long ZAddressOffsetMax;
|
||||
|
||||
// Address space start/end/size
|
||||
public static long ZAddressSpaceStart;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
|
||||
}
|
||||
@ -87,10 +83,7 @@ public class ZGlobals {
|
||||
ZAddressOffsetShift = db.lookupLongConstant("ZAddressOffsetShift").longValue();
|
||||
|
||||
ZAddressOffsetBits = db.lookupLongConstant("ZAddressOffsetBits").longValue();
|
||||
ZAddressOffsetMask = db.lookupLongConstant("ZAddressOffsetMask").longValue();
|
||||
ZAddressOffsetMax = db.lookupLongConstant("ZAddressOffsetMax").longValue();
|
||||
|
||||
ZAddressSpaceStart = db.lookupLongConstant("ZAddressSpaceStart").longValue();
|
||||
}
|
||||
|
||||
private static ZGlobalsForVMStructs instance() {
|
||||
@ -105,6 +98,10 @@ public class ZGlobals {
|
||||
return instance().ZGlobalSeqNum();
|
||||
}
|
||||
|
||||
public static long ZAddressOffsetMask() {
|
||||
return instance().ZAddressOffsetMask();
|
||||
}
|
||||
|
||||
public static long ZAddressGoodMask() {
|
||||
return instance().ZAddressGoodMask();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,6 +34,7 @@ import sun.jvm.hotspot.types.TypeDataBase;
|
||||
class ZGlobalsForVMStructs extends VMObject {
|
||||
private static AddressField ZGlobalPhaseField;
|
||||
private static AddressField ZGlobalSeqNumField;
|
||||
private static AddressField ZAddressOffsetMaskField;
|
||||
private static AddressField ZAddressGoodMaskField;
|
||||
private static AddressField ZAddressBadMaskField;
|
||||
private static AddressField ZAddressWeakBadMaskField;
|
||||
@ -49,6 +50,7 @@ class ZGlobalsForVMStructs extends VMObject {
|
||||
|
||||
ZGlobalPhaseField = type.getAddressField("_ZGlobalPhase");
|
||||
ZGlobalSeqNumField = type.getAddressField("_ZGlobalSeqNum");
|
||||
ZAddressOffsetMaskField = type.getAddressField("_ZAddressOffsetMask");
|
||||
ZAddressGoodMaskField = type.getAddressField("_ZAddressGoodMask");
|
||||
ZAddressBadMaskField = type.getAddressField("_ZAddressBadMask");
|
||||
ZAddressWeakBadMaskField = type.getAddressField("_ZAddressWeakBadMask");
|
||||
@ -68,6 +70,10 @@ class ZGlobalsForVMStructs extends VMObject {
|
||||
return ZGlobalSeqNumField.getValue(addr).getJIntAt(0);
|
||||
}
|
||||
|
||||
long ZAddressOffsetMask() {
|
||||
return ZAddressOffsetMaskField.getValue(addr).getJLongAt(0);
|
||||
}
|
||||
|
||||
long ZAddressGoodMask() {
|
||||
return ZAddressGoodMaskField.getValue(addr).getJLongAt(0);
|
||||
}
|
||||
|
@ -30,36 +30,14 @@
|
||||
resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java 8220624 generic-all
|
||||
serviceability/sa/CDSJMapClstats.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbDumpheap.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbCDSJstackPrintAll.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id0 8220624 generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id1 8220624 generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id2 8220624 generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id3 8220624 generic-all
|
||||
serviceability/sa/ClhsdbInspect.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbJdis.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbJhisto.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbJstack.java#id0 8220624 generic-all
|
||||
serviceability/sa/ClhsdbJstack.java#id1 8220624 generic-all
|
||||
serviceability/sa/ClhsdbJstackXcompStress.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbPrintAs.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbPrintStatics.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbPstack.java#id0 8220624 generic-all
|
||||
serviceability/sa/ClhsdbPstack.java#id1 8220624 generic-all
|
||||
serviceability/sa/ClhsdbSource.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbSymbol.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbThread.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbWhere.java 8220624 generic-all
|
||||
serviceability/sa/DeadlockDetectionTest.java 8220624 generic-all
|
||||
serviceability/sa/JhsdbThreadInfoTest.java 8220624 generic-all
|
||||
serviceability/sa/ClhsdbCDSCore.java 8220624 generic-all
|
||||
serviceability/sa/TestClhsdbJstackLock.java 8220624 generic-all
|
||||
serviceability/sa/TestHeapDumpForInvokeDynamic.java 8220624 generic-all
|
||||
serviceability/sa/TestHeapDumpForLargeArray.java 8220624 generic-all
|
||||
serviceability/sa/TestJhsdbJstackLock.java 8220624 generic-all
|
||||
serviceability/sa/TestJhsdbJstackMixed.java 8220624 generic-all
|
||||
serviceability/sa/TestJmapCore.java 8220624 generic-all
|
||||
serviceability/sa/TestJmapCoreMetaspace.java 8220624 generic-all
|
||||
serviceability/sa/TestSysProps.java 8220624 generic-all
|
||||
serviceability/sa/sadebugd/DebugdConnectTest.java 8220624 generic-all
|
||||
serviceability/sa/sadebugd/DisableRegistryTest.java 8220624 generic-all
|
||||
vmTestbase/jit/escape/AdaptiveBlocking/AdaptiveBlocking001/AdaptiveBlocking001.java 8260303 windows-x64
|
||||
|
Loading…
x
Reference in New Issue
Block a user