src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZGlobalsForVMStructs.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
31 import sun.jvm.hotspot.types.Type; |
31 import sun.jvm.hotspot.types.Type; |
32 import sun.jvm.hotspot.types.TypeDataBase; |
32 import sun.jvm.hotspot.types.TypeDataBase; |
33 |
33 |
34 class ZGlobalsForVMStructs extends VMObject { |
34 class ZGlobalsForVMStructs extends VMObject { |
35 private static AddressField ZGlobalPhaseField; |
35 private static AddressField ZGlobalPhaseField; |
|
36 private static AddressField ZGlobalSeqNumField; |
36 private static AddressField ZAddressGoodMaskField; |
37 private static AddressField ZAddressGoodMaskField; |
37 private static AddressField ZAddressBadMaskField; |
38 private static AddressField ZAddressBadMaskField; |
38 private static AddressField ZAddressWeakBadMaskField; |
39 private static AddressField ZAddressWeakBadMaskField; |
39 private static AddressField ZObjectAlignmentSmallShiftField; |
40 private static AddressField ZObjectAlignmentSmallShiftField; |
40 private static AddressField ZObjectAlignmentSmallField; |
41 private static AddressField ZObjectAlignmentSmallField; |
45 |
46 |
46 static private synchronized void initialize(TypeDataBase db) { |
47 static private synchronized void initialize(TypeDataBase db) { |
47 Type type = db.lookupType("ZGlobalsForVMStructs"); |
48 Type type = db.lookupType("ZGlobalsForVMStructs"); |
48 |
49 |
49 ZGlobalPhaseField = type.getAddressField("_ZGlobalPhase"); |
50 ZGlobalPhaseField = type.getAddressField("_ZGlobalPhase"); |
|
51 ZGlobalSeqNumField = type.getAddressField("_ZGlobalSeqNum"); |
50 ZAddressGoodMaskField = type.getAddressField("_ZAddressGoodMask"); |
52 ZAddressGoodMaskField = type.getAddressField("_ZAddressGoodMask"); |
51 ZAddressBadMaskField = type.getAddressField("_ZAddressBadMask"); |
53 ZAddressBadMaskField = type.getAddressField("_ZAddressBadMask"); |
52 ZAddressWeakBadMaskField = type.getAddressField("_ZAddressWeakBadMask"); |
54 ZAddressWeakBadMaskField = type.getAddressField("_ZAddressWeakBadMask"); |
53 ZObjectAlignmentSmallShiftField = type.getAddressField("_ZObjectAlignmentSmallShift"); |
55 ZObjectAlignmentSmallShiftField = type.getAddressField("_ZObjectAlignmentSmallShift"); |
54 ZObjectAlignmentSmallField = type.getAddressField("_ZObjectAlignmentSmall"); |
56 ZObjectAlignmentSmallField = type.getAddressField("_ZObjectAlignmentSmall"); |
58 super(addr); |
60 super(addr); |
59 } |
61 } |
60 |
62 |
61 int ZGlobalPhase() { |
63 int ZGlobalPhase() { |
62 return ZGlobalPhaseField.getValue(addr).getJIntAt(0); |
64 return ZGlobalPhaseField.getValue(addr).getJIntAt(0); |
|
65 } |
|
66 |
|
67 int ZGlobalSeqNum() { |
|
68 return ZGlobalSeqNumField.getValue(addr).getJIntAt(0); |
63 } |
69 } |
64 |
70 |
65 long ZAddressGoodMask() { |
71 long ZAddressGoodMask() { |
66 return ZAddressGoodMaskField.getValue(addr).getJLongAt(0); |
72 return ZAddressGoodMaskField.getValue(addr).getJLongAt(0); |
67 } |
73 } |