1 /*
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
60 static_field(ZGlobalsForVMStructs, _instance_p, ZGlobalsForVMStructs*) \
61 nonstatic_field(ZGlobalsForVMStructs, _ZGlobalPhase, uint32_t*) \
62 nonstatic_field(ZGlobalsForVMStructs, _ZGlobalSeqNum, uint32_t*) \
63 nonstatic_field(ZGlobalsForVMStructs, _ZAddressGoodMask, uintptr_t*) \
64 nonstatic_field(ZGlobalsForVMStructs, _ZAddressBadMask, uintptr_t*) \
65 nonstatic_field(ZGlobalsForVMStructs, _ZAddressWeakBadMask, uintptr_t*) \
66 nonstatic_field(ZGlobalsForVMStructs, _ZObjectAlignmentSmallShift, const int*) \
67 nonstatic_field(ZGlobalsForVMStructs, _ZObjectAlignmentSmall, const int*) \
68 \
69 nonstatic_field(ZCollectedHeap, _heap, ZHeap) \
70 \
71 nonstatic_field(ZHeap, _page_allocator, ZPageAllocator) \
72 nonstatic_field(ZHeap, _page_table, ZPageTable) \
73 \
74 nonstatic_field(ZPage, _type, const uint8_t) \
75 nonstatic_field(ZPage, _seqnum, uint32_t) \
76 nonstatic_field(ZPage, _virtual, const ZVirtualMemory) \
77 volatile_nonstatic_field(ZPage, _top, uintptr_t) \
78 \
79 nonstatic_field(ZPageAllocator, _max_capacity, const size_t) \
80 nonstatic_field(ZPageAllocator, _capacity, size_t) \
81 nonstatic_field(ZPageAllocator, _used, size_t) \
82 \
83 nonstatic_field(ZPageTable, _map, ZGranuleMapForPageTable) \
84 \
85 nonstatic_field(ZGranuleMapForPageTable, _map, ZPage** const) \
86 \
87 nonstatic_field(ZVirtualMemory, _start, const uintptr_t) \
88 nonstatic_field(ZVirtualMemory, _end, const uintptr_t) \
89 \
90 nonstatic_field(ZForwarding, _entries, const ZAttachedArrayForForwarding)
91
92 #define VM_INT_CONSTANTS_ZGC(declare_constant, declare_constant_with_value) \
93 declare_constant(ZPhaseRelocate) \
94 declare_constant(ZPageTypeSmall) \
95 declare_constant(ZPageTypeMedium) \
96 declare_constant(ZPageTypeLarge) \
97 declare_constant(ZObjectAlignmentMediumShift) \
98 declare_constant(ZObjectAlignmentLargeShift)
99
100 #define VM_LONG_CONSTANTS_ZGC(declare_constant) \
101 declare_constant(ZGranuleSizeShift) \
|
1 /*
2 * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
60 static_field(ZGlobalsForVMStructs, _instance_p, ZGlobalsForVMStructs*) \
61 nonstatic_field(ZGlobalsForVMStructs, _ZGlobalPhase, uint32_t*) \
62 nonstatic_field(ZGlobalsForVMStructs, _ZGlobalSeqNum, uint32_t*) \
63 nonstatic_field(ZGlobalsForVMStructs, _ZAddressGoodMask, uintptr_t*) \
64 nonstatic_field(ZGlobalsForVMStructs, _ZAddressBadMask, uintptr_t*) \
65 nonstatic_field(ZGlobalsForVMStructs, _ZAddressWeakBadMask, uintptr_t*) \
66 nonstatic_field(ZGlobalsForVMStructs, _ZObjectAlignmentSmallShift, const int*) \
67 nonstatic_field(ZGlobalsForVMStructs, _ZObjectAlignmentSmall, const int*) \
68 \
69 nonstatic_field(ZCollectedHeap, _heap, ZHeap) \
70 \
71 nonstatic_field(ZHeap, _page_allocator, ZPageAllocator) \
72 nonstatic_field(ZHeap, _page_table, ZPageTable) \
73 \
74 nonstatic_field(ZPage, _type, const uint8_t) \
75 nonstatic_field(ZPage, _seqnum, uint32_t) \
76 nonstatic_field(ZPage, _virtual, const ZVirtualMemory) \
77 volatile_nonstatic_field(ZPage, _top, uintptr_t) \
78 \
79 nonstatic_field(ZPageAllocator, _max_capacity, const size_t) \
80 volatile_nonstatic_field(ZPageAllocator, _capacity, size_t) \
81 volatile_nonstatic_field(ZPageAllocator, _used, size_t) \
82 \
83 nonstatic_field(ZPageTable, _map, ZGranuleMapForPageTable) \
84 \
85 nonstatic_field(ZGranuleMapForPageTable, _map, ZPage** const) \
86 \
87 nonstatic_field(ZVirtualMemory, _start, const uintptr_t) \
88 nonstatic_field(ZVirtualMemory, _end, const uintptr_t) \
89 \
90 nonstatic_field(ZForwarding, _entries, const ZAttachedArrayForForwarding)
91
92 #define VM_INT_CONSTANTS_ZGC(declare_constant, declare_constant_with_value) \
93 declare_constant(ZPhaseRelocate) \
94 declare_constant(ZPageTypeSmall) \
95 declare_constant(ZPageTypeMedium) \
96 declare_constant(ZPageTypeLarge) \
97 declare_constant(ZObjectAlignmentMediumShift) \
98 declare_constant(ZObjectAlignmentLargeShift)
99
100 #define VM_LONG_CONSTANTS_ZGC(declare_constant) \
101 declare_constant(ZGranuleSizeShift) \
|