21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "gc/g1/g1RootClosures.inline.hpp" |
26 #include "gc/g1/g1OopClosures.inline.hpp" |
|
27 #include "gc/g1/g1RootClosures.hpp" |
|
28 #include "gc/g1/g1SharedClosures.hpp" |
|
29 |
|
30 // Closures used for standard G1 evacuation. |
|
31 class G1EvacuationClosures : public G1EvacuationRootClosures { |
|
32 G1SharedClosures<G1MarkNone> _closures; |
|
33 |
|
34 public: |
|
35 G1EvacuationClosures(G1CollectedHeap* g1h, |
|
36 G1ParScanThreadState* pss, |
|
37 bool gcs_are_young) : |
|
38 _closures(g1h, pss, gcs_are_young, /* must_claim_cld */ false) {} |
|
39 |
|
40 OopClosure* weak_oops() { return &_closures._buffered_oops; } |
|
41 OopClosure* strong_oops() { return &_closures._buffered_oops; } |
|
42 |
|
43 CLDClosure* weak_clds() { return &_closures._clds; } |
|
44 CLDClosure* strong_clds() { return &_closures._clds; } |
|
45 CLDClosure* thread_root_clds() { return NULL; } |
|
46 CLDClosure* second_pass_weak_clds() { return NULL; } |
|
47 |
|
48 CodeBlobClosure* strong_codeblobs() { return &_closures._codeblobs; } |
|
49 CodeBlobClosure* weak_codeblobs() { return &_closures._codeblobs; } |
|
50 |
|
51 void flush() { _closures._buffered_oops.done(); } |
|
52 double closure_app_seconds() { return _closures._buffered_oops.closure_app_seconds(); } |
|
53 |
|
54 OopClosure* raw_strong_oops() { return &_closures._oops; } |
|
55 |
|
56 bool trace_metadata() { return false; } |
|
57 }; |
27 |
58 |
28 // Closures used during initial mark. |
59 // Closures used during initial mark. |
29 // The treatment of "weak" roots is selectable through the template parameter, |
60 // The treatment of "weak" roots is selectable through the template parameter, |
30 // this is usually used to control unloading of classes and interned strings. |
61 // this is usually used to control unloading of classes and interned strings. |
31 template <G1Mark MarkWeak> |
62 template <G1Mark MarkWeak> |