author | chegar |
Thu, 17 Oct 2019 20:54:25 +0100 | |
branch | datagramsocketimpl-branch |
changeset 58679 | 9c3209ff7550 |
parent 58678 | 9cf78a70fa4f |
parent 58066 | 8407928b9fe5 |
permissions | -rw-r--r-- |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
1 |
/* |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
54511
diff
changeset
|
2 |
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
4 |
* |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
8 |
* |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
13 |
* accompanied this code). |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
14 |
* |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
18 |
* |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
21 |
* questions. |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
22 |
*/ |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
23 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
24 |
#ifndef SHARE_GC_Z_ZROOTSITERATOR_HPP |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
25 |
#define SHARE_GC_Z_ZROOTSITERATOR_HPP |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
26 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
27 |
#include "gc/shared/oopStorageParState.hpp" |
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
28 |
#include "gc/shared/suspendibleThreadSet.hpp" |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
29 |
#include "memory/allocation.hpp" |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
30 |
#include "memory/iterator.hpp" |
51803 | 31 |
#include "runtime/thread.hpp" |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
32 |
#include "utilities/globalDefinitions.hpp" |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
33 |
|
53843
b38d76fc4835
8219332: ZGC: Improve ZRootsIteratorClosure abstraction
pliden
parents:
52939
diff
changeset
|
34 |
class ZRootsIteratorClosure : public OopClosure { |
51803 | 35 |
public: |
53843
b38d76fc4835
8219332: ZGC: Improve ZRootsIteratorClosure abstraction
pliden
parents:
52939
diff
changeset
|
36 |
virtual void do_thread(Thread* thread) {} |
51803 | 37 |
}; |
38 |
||
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
39 |
typedef OopStorage::ParState<true /* concurrent */, false /* is_const */> ZOopStorageIterator; |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
40 |
|
51803 | 41 |
template <typename T, void (T::*F)(ZRootsIteratorClosure*)> |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
42 |
class ZSerialOopsDo { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
43 |
private: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
44 |
T* const _iter; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
45 |
volatile bool _claimed; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
46 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
47 |
public: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
48 |
ZSerialOopsDo(T* iter); |
51803 | 49 |
void oops_do(ZRootsIteratorClosure* cl); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
50 |
}; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
51 |
|
51803 | 52 |
template <typename T, void (T::*F)(ZRootsIteratorClosure*)> |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
53 |
class ZParallelOopsDo { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
54 |
private: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
55 |
T* const _iter; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
56 |
volatile bool _completed; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
57 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
58 |
public: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
59 |
ZParallelOopsDo(T* iter); |
51803 | 60 |
void oops_do(ZRootsIteratorClosure* cl); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
61 |
}; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
62 |
|
51803 | 63 |
template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)> |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
64 |
class ZSerialWeakOopsDo { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
65 |
private: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
66 |
T* const _iter; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
67 |
volatile bool _claimed; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
68 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
69 |
public: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
70 |
ZSerialWeakOopsDo(T* iter); |
51803 | 71 |
void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
72 |
}; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
73 |
|
51803 | 74 |
template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)> |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
75 |
class ZParallelWeakOopsDo { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
76 |
private: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
77 |
T* const _iter; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
78 |
volatile bool _completed; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
79 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
80 |
public: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
81 |
ZParallelWeakOopsDo(T* iter); |
51803 | 82 |
void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
83 |
}; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
84 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
85 |
class ZRootsIterator { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
86 |
private: |
57851
6728c41f2a08
8229451: ZGC: Make some roots invisible to the heap iterator
pliden
parents:
57659
diff
changeset
|
87 |
bool _visit_jvmti_weak_export; |
6728c41f2a08
8229451: ZGC: Make some roots invisible to the heap iterator
pliden
parents:
57659
diff
changeset
|
88 |
|
51803 | 89 |
void do_universe(ZRootsIteratorClosure* cl); |
90 |
void do_object_synchronizer(ZRootsIteratorClosure* cl); |
|
91 |
void do_management(ZRootsIteratorClosure* cl); |
|
92 |
void do_jvmti_export(ZRootsIteratorClosure* cl); |
|
93 |
void do_jvmti_weak_export(ZRootsIteratorClosure* cl); |
|
94 |
void do_system_dictionary(ZRootsIteratorClosure* cl); |
|
95 |
void do_threads(ZRootsIteratorClosure* cl); |
|
96 |
void do_code_cache(ZRootsIteratorClosure* cl); |
|
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
97 |
|
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
98 |
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_universe> _universe; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
99 |
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_object_synchronizer> _object_synchronizer; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
100 |
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_management> _management; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
101 |
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_export> _jvmti_export; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
102 |
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_weak_export> _jvmti_weak_export; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
103 |
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_system_dictionary> _system_dictionary; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
104 |
ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_threads> _threads; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
105 |
ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_code_cache> _code_cache; |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
106 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
107 |
public: |
58066
8407928b9fe5
8230566: ZGC: Don't substitute klass pointer during array clearing
pliden
parents:
57851
diff
changeset
|
108 |
ZRootsIterator(bool visit_jvmti_weak_export = false); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
109 |
~ZRootsIterator(); |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
110 |
|
57851
6728c41f2a08
8229451: ZGC: Make some roots invisible to the heap iterator
pliden
parents:
57659
diff
changeset
|
111 |
void oops_do(ZRootsIteratorClosure* cl); |
6728c41f2a08
8229451: ZGC: Make some roots invisible to the heap iterator
pliden
parents:
57659
diff
changeset
|
112 |
}; |
6728c41f2a08
8229451: ZGC: Make some roots invisible to the heap iterator
pliden
parents:
57659
diff
changeset
|
113 |
|
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
114 |
class ZConcurrentRootsIterator { |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
115 |
private: |
57658 | 116 |
ZOopStorageIterator _jni_handles_iter; |
117 |
ZOopStorageIterator _vm_handles_iter; |
|
118 |
const int _cld_claim; |
|
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
119 |
|
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
120 |
void do_jni_handles(ZRootsIteratorClosure* cl); |
55740 | 121 |
void do_vm_handles(ZRootsIteratorClosure* cl); |
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
122 |
void do_class_loader_data_graph(ZRootsIteratorClosure* cl); |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
123 |
|
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
124 |
ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_jni_handles> _jni_handles; |
55740 | 125 |
ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_vm_handles> _vm_handles; |
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
126 |
ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_class_loader_data_graph> _class_loader_data_graph; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
127 |
|
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
128 |
public: |
55603
3868dde58ebb
8227175: ZGC: ZHeapIterator visits potentially dead objects
stefank
parents:
54511
diff
changeset
|
129 |
ZConcurrentRootsIterator(int cld_claim); |
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
130 |
~ZConcurrentRootsIterator(); |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
131 |
|
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
132 |
void oops_do(ZRootsIteratorClosure* cl); |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
133 |
}; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
134 |
|
57658 | 135 |
class ZConcurrentRootsIteratorClaimStrong : public ZConcurrentRootsIterator { |
136 |
public: |
|
137 |
ZConcurrentRootsIteratorClaimStrong() : |
|
138 |
ZConcurrentRootsIterator(ClassLoaderData::_claim_strong) {} |
|
139 |
}; |
|
140 |
||
141 |
class ZConcurrentRootsIteratorClaimOther : public ZConcurrentRootsIterator { |
|
142 |
public: |
|
143 |
ZConcurrentRootsIteratorClaimOther() : |
|
144 |
ZConcurrentRootsIterator(ClassLoaderData::_claim_other) {} |
|
145 |
}; |
|
146 |
||
147 |
class ZConcurrentRootsIteratorClaimNone : public ZConcurrentRootsIterator { |
|
148 |
public: |
|
149 |
ZConcurrentRootsIteratorClaimNone() : |
|
150 |
ZConcurrentRootsIterator(ClassLoaderData::_claim_none) {} |
|
151 |
}; |
|
152 |
||
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
153 |
class ZWeakRootsIterator { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
154 |
private: |
51803 | 155 |
void do_jvmti_weak_export(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); |
156 |
void do_jfr_weak(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); |
|
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
157 |
|
57658 | 158 |
ZSerialWeakOopsDo<ZWeakRootsIterator, &ZWeakRootsIterator::do_jvmti_weak_export> _jvmti_weak_export; |
159 |
ZSerialWeakOopsDo<ZWeakRootsIterator, &ZWeakRootsIterator::do_jfr_weak> _jfr_weak; |
|
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
160 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
161 |
public: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
162 |
ZWeakRootsIterator(); |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
163 |
~ZWeakRootsIterator(); |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
164 |
|
51803 | 165 |
void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); |
166 |
void oops_do(ZRootsIteratorClosure* cl); |
|
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
167 |
}; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
168 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
169 |
class ZConcurrentWeakRootsIterator { |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
170 |
private: |
52140
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
171 |
ZOopStorageIterator _vm_weak_handles_iter; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
172 |
ZOopStorageIterator _jni_weak_handles_iter; |
3a168f782e80
8210064: ZGC: Introduce ZConcurrentRootsIterator for scanning a subset of strong IN_NATIVE roots concurrently
eosterlund
parents:
51803
diff
changeset
|
173 |
ZOopStorageIterator _string_table_iter; |
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53843
diff
changeset
|
174 |
ZOopStorageIterator _resolved_method_table_iter; |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
175 |
|
51803 | 176 |
void do_vm_weak_handles(ZRootsIteratorClosure* cl); |
177 |
void do_jni_weak_handles(ZRootsIteratorClosure* cl); |
|
178 |
void do_string_table(ZRootsIteratorClosure* cl); |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53843
diff
changeset
|
179 |
void do_resolved_method_table(ZRootsIteratorClosure* cl); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
180 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53843
diff
changeset
|
181 |
ZParallelOopsDo<ZConcurrentWeakRootsIterator, &ZConcurrentWeakRootsIterator::do_vm_weak_handles> _vm_weak_handles; |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53843
diff
changeset
|
182 |
ZParallelOopsDo<ZConcurrentWeakRootsIterator, &ZConcurrentWeakRootsIterator::do_jni_weak_handles> _jni_weak_handles; |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53843
diff
changeset
|
183 |
ZParallelOopsDo<ZConcurrentWeakRootsIterator, &ZConcurrentWeakRootsIterator::do_string_table> _string_table; |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53843
diff
changeset
|
184 |
ZParallelOopsDo<ZConcurrentWeakRootsIterator, &ZConcurrentWeakRootsIterator::do_resolved_method_table> _resolved_method_table; |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
185 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
186 |
public: |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
187 |
ZConcurrentWeakRootsIterator(); |
50556
e5a40146791b
8204613: StringTable: Calculates wrong number of uncleaned items.
rehn
parents:
50525
diff
changeset
|
188 |
~ZConcurrentWeakRootsIterator(); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
189 |
|
51803 | 190 |
void oops_do(ZRootsIteratorClosure* cl); |
50525
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
191 |
}; |
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
192 |
|
767cdb97f103
8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff
changeset
|
193 |
#endif // SHARE_GC_Z_ZROOTSITERATOR_HPP |