equal
deleted
inserted
replaced
26 #define SHARE_GC_G1_G1CODEBLOBCLOSURE_HPP |
26 #define SHARE_GC_G1_G1CODEBLOBCLOSURE_HPP |
27 |
27 |
28 #include "gc/g1/g1CollectedHeap.hpp" |
28 #include "gc/g1/g1CollectedHeap.hpp" |
29 #include "memory/iterator.hpp" |
29 #include "memory/iterator.hpp" |
30 |
30 |
|
31 class G1ConcurrentMark; |
31 class nmethod; |
32 class nmethod; |
32 |
33 |
33 class G1CodeBlobClosure : public CodeBlobClosure { |
34 class G1CodeBlobClosure : public CodeBlobClosure { |
|
35 // Gather nmethod remembered set entries. |
34 class HeapRegionGatheringOopClosure : public OopClosure { |
36 class HeapRegionGatheringOopClosure : public OopClosure { |
35 G1CollectedHeap* _g1h; |
37 G1CollectedHeap* _g1h; |
36 OopClosure* _work; |
38 OopClosure* _work; |
37 nmethod* _nm; |
39 nmethod* _nm; |
38 |
40 |
48 void set_nm(nmethod* nm) { |
50 void set_nm(nmethod* nm) { |
49 _nm = nm; |
51 _nm = nm; |
50 } |
52 } |
51 }; |
53 }; |
52 |
54 |
|
55 // Mark all oops below TAMS. |
|
56 class MarkingOopClosure : public OopClosure { |
|
57 G1ConcurrentMark* _cm; |
|
58 uint _worker_id; |
|
59 |
|
60 template <typename T> |
|
61 void do_oop_work(T* p); |
|
62 |
|
63 public: |
|
64 MarkingOopClosure(uint worker_id); |
|
65 |
|
66 void do_oop(oop* o); |
|
67 void do_oop(narrowOop* o); |
|
68 }; |
|
69 |
53 HeapRegionGatheringOopClosure _oc; |
70 HeapRegionGatheringOopClosure _oc; |
|
71 MarkingOopClosure _marking_oc; |
|
72 |
|
73 bool _strong; |
|
74 |
|
75 void do_code_blob_weak(CodeBlob* cb); |
|
76 void do_code_blob_strong(CodeBlob* cb); |
|
77 |
54 public: |
78 public: |
55 G1CodeBlobClosure(OopClosure* oc) : _oc(oc) {} |
79 G1CodeBlobClosure(uint worker_id, OopClosure* oc, bool strong) : |
|
80 _oc(oc), _marking_oc(worker_id), _strong(strong) { } |
|
81 |
|
82 void do_evacuation_and_fixup(nmethod* nm); |
|
83 void do_marking(nmethod* nm); |
56 |
84 |
57 void do_code_blob(CodeBlob* cb); |
85 void do_code_blob(CodeBlob* cb); |
58 }; |
86 }; |
59 |
87 |
60 #endif // SHARE_GC_G1_G1CODEBLOBCLOSURE_HPP |
88 #endif // SHARE_GC_G1_G1CODEBLOBCLOSURE_HPP |