equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. |
2 * Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved. |
3 * |
3 * |
4 * This code is free software; you can redistribute it and/or modify it |
4 * This code is free software; you can redistribute it and/or modify it |
5 * under the terms of the GNU General Public License version 2 only, as |
5 * under the terms of the GNU General Public License version 2 only, as |
6 * published by the Free Software Foundation. |
6 * published by the Free Software Foundation. |
7 * |
7 * |
24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP |
24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP |
25 #define SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP |
25 #define SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP |
26 |
26 |
27 #include "code/codeCache.hpp" |
27 #include "code/codeCache.hpp" |
28 #include "gc/shenandoah/shenandoahSharedVariables.hpp" |
28 #include "gc/shenandoah/shenandoahSharedVariables.hpp" |
|
29 #include "gc/shenandoah/shenandoahLock.hpp" |
29 #include "memory/allocation.hpp" |
30 #include "memory/allocation.hpp" |
30 #include "memory/iterator.hpp" |
31 #include "memory/iterator.hpp" |
31 |
32 |
32 class ShenandoahHeap; |
33 class ShenandoahHeap; |
33 class ShenandoahHeapRegion; |
34 class ShenandoahHeapRegion; |
119 public: |
120 public: |
120 ShenandoahCsetCodeRootsIterator() : ShenandoahCodeRootsIterator() {}; |
121 ShenandoahCsetCodeRootsIterator() : ShenandoahCodeRootsIterator() {}; |
121 void possibly_parallel_blobs_do(CodeBlobClosure* f); |
122 void possibly_parallel_blobs_do(CodeBlobClosure* f); |
122 }; |
123 }; |
123 |
124 |
124 class ShenandoahCodeRoots : public CHeapObj<mtGC> { |
125 class ShenandoahCodeRoots : public AllStatic { |
125 friend class ShenandoahHeap; |
126 friend class ShenandoahHeap; |
126 friend class ShenandoahCodeRootsIterator; |
127 friend class ShenandoahCodeRootsIterator; |
127 |
128 |
128 public: |
129 public: |
129 static void initialize(); |
130 static void initialize(); |
130 static void add_nmethod(nmethod* nm); |
131 static void add_nmethod(nmethod* nm); |
131 static void remove_nmethod(nmethod* nm); |
132 static void remove_nmethod(nmethod* nm); |
132 |
133 |
133 private: |
134 private: |
134 static GrowableArray<ShenandoahNMethod*>* _recorded_nms; |
135 static GrowableArray<ShenandoahNMethod*>* _recorded_nms; |
|
136 static ShenandoahLock _recorded_nms_lock; |
135 }; |
137 }; |
136 |
138 |
137 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP |
139 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP |