28 #include "gc/z/zCollectedHeap.hpp" |
28 #include "gc/z/zCollectedHeap.hpp" |
29 #include "gc/z/zForwarding.hpp" |
29 #include "gc/z/zForwarding.hpp" |
30 #include "gc/z/zGranuleMap.hpp" |
30 #include "gc/z/zGranuleMap.hpp" |
31 #include "gc/z/zHeap.hpp" |
31 #include "gc/z/zHeap.hpp" |
32 #include "gc/z/zPageAllocator.hpp" |
32 #include "gc/z/zPageAllocator.hpp" |
33 #include "gc/z/zPhysicalMemory.hpp" |
|
34 #include "utilities/macros.hpp" |
33 #include "utilities/macros.hpp" |
35 |
34 |
36 // Expose some ZGC globals to the SA agent. |
35 // Expose some ZGC globals to the SA agent. |
37 class ZGlobalsForVMStructs { |
36 class ZGlobalsForVMStructs { |
38 static ZGlobalsForVMStructs _instance; |
37 static ZGlobalsForVMStructs _instance; |
75 nonstatic_field(ZPage, _type, const uint8_t) \ |
74 nonstatic_field(ZPage, _type, const uint8_t) \ |
76 nonstatic_field(ZPage, _seqnum, uint32_t) \ |
75 nonstatic_field(ZPage, _seqnum, uint32_t) \ |
77 nonstatic_field(ZPage, _virtual, const ZVirtualMemory) \ |
76 nonstatic_field(ZPage, _virtual, const ZVirtualMemory) \ |
78 volatile_nonstatic_field(ZPage, _top, uintptr_t) \ |
77 volatile_nonstatic_field(ZPage, _top, uintptr_t) \ |
79 \ |
78 \ |
80 nonstatic_field(ZPageAllocator, _physical, ZPhysicalMemoryManager) \ |
79 nonstatic_field(ZPageAllocator, _max_capacity, const size_t) \ |
|
80 nonstatic_field(ZPageAllocator, _capacity, size_t) \ |
81 nonstatic_field(ZPageAllocator, _used, size_t) \ |
81 nonstatic_field(ZPageAllocator, _used, size_t) \ |
82 \ |
82 \ |
83 nonstatic_field(ZPageTable, _map, ZGranuleMapForPageTable) \ |
83 nonstatic_field(ZPageTable, _map, ZGranuleMapForPageTable) \ |
84 \ |
84 \ |
85 nonstatic_field(ZGranuleMapForPageTable, _map, ZPage** const) \ |
85 nonstatic_field(ZGranuleMapForPageTable, _map, ZPage** const) \ |
86 \ |
86 \ |
87 nonstatic_field(ZVirtualMemory, _start, uintptr_t) \ |
87 nonstatic_field(ZVirtualMemory, _start, const uintptr_t) \ |
88 nonstatic_field(ZVirtualMemory, _end, uintptr_t) \ |
88 nonstatic_field(ZVirtualMemory, _end, const uintptr_t) \ |
89 \ |
89 \ |
90 nonstatic_field(ZForwarding, _entries, const ZAttachedArrayForForwarding) \ |
90 nonstatic_field(ZForwarding, _entries, const ZAttachedArrayForForwarding) |
91 \ |
|
92 nonstatic_field(ZPhysicalMemoryManager, _max_capacity, const size_t) \ |
|
93 nonstatic_field(ZPhysicalMemoryManager, _capacity, size_t) |
|
94 |
91 |
95 #define VM_INT_CONSTANTS_ZGC(declare_constant, declare_constant_with_value) \ |
92 #define VM_INT_CONSTANTS_ZGC(declare_constant, declare_constant_with_value) \ |
96 declare_constant(ZPhaseRelocate) \ |
93 declare_constant(ZPhaseRelocate) \ |
97 declare_constant(ZPageTypeSmall) \ |
94 declare_constant(ZPageTypeSmall) \ |
98 declare_constant(ZPageTypeMedium) \ |
95 declare_constant(ZPageTypeMedium) \ |