Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1RootProcessor.cpp @ 23287:bd88fd590f4e
Restore G1 changes from e13c65f874e5 after merge
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Fri, 08 Jan 2016 15:46:55 +0100 |
parents | 9b582718fbea |
children | b5f3a471e646 |
comparison
equal
deleted
inserted
replaced
23286:dd9cc155639c | 23287:bd88fd590f4e |
---|---|
136 BufferingOopClosure buf_scan_non_heap_weak_roots(scan_non_heap_weak_roots); | 136 BufferingOopClosure buf_scan_non_heap_weak_roots(scan_non_heap_weak_roots); |
137 | 137 |
138 OopClosure* const weak_roots = &buf_scan_non_heap_weak_roots; | 138 OopClosure* const weak_roots = &buf_scan_non_heap_weak_roots; |
139 OopClosure* const strong_roots = &buf_scan_non_heap_roots; | 139 OopClosure* const strong_roots = &buf_scan_non_heap_roots; |
140 | 140 |
141 bool trace_codecache = false; | |
142 #if INCLUDE_JVMCI | |
143 bool during_im = _g1h->g1_policy()->during_initial_mark_pause(); | |
144 // Without eager nmethod unloading, we need to treat all oops in code cache as strong during the initial mark | |
145 trace_codecache = during_im && !ClassUnloadingWithConcurrentMark; | |
146 #endif | |
147 | |
141 // CodeBlobClosures are not interoperable with BufferingOopClosures | 148 // CodeBlobClosures are not interoperable with BufferingOopClosures |
142 G1CodeBlobClosure root_code_blobs(scan_non_heap_roots); | 149 G1CodeBlobClosure root_code_blobs(scan_non_heap_roots); |
143 | 150 |
144 process_java_roots(strong_roots, | 151 process_java_roots(strong_roots, |
145 trace_metadata ? scan_strong_clds : NULL, | 152 trace_metadata ? scan_strong_clds : NULL, |
146 scan_strong_clds, | 153 scan_strong_clds, |
147 trace_metadata ? NULL : scan_weak_clds, | 154 trace_metadata ? NULL : scan_weak_clds, |
148 &root_code_blobs, | 155 trace_codecache ? NULL : &root_code_blobs, |
149 phase_times, | 156 phase_times, |
150 worker_i); | 157 worker_i); |
151 | 158 |
152 // This is the point where this worker thread will not find more strong CLDs/nmethods. | 159 // This is the point where this worker thread will not find more strong CLDs/nmethods. |
153 // Report this so G1 can synchronize the strong and weak CLDs/nmethods processing. | 160 // Report this so G1 can synchronize the strong and weak CLDs/nmethods processing. |
154 if (trace_metadata) { | 161 if (trace_metadata) { |
155 worker_has_discovered_all_strong_classes(); | 162 worker_has_discovered_all_strong_classes(); |
156 } | 163 } |
157 | 164 |
158 process_vm_roots(strong_roots, weak_roots, phase_times, worker_i); | 165 process_vm_roots(strong_roots, weak_roots, phase_times, worker_i); |
166 | |
167 #if INCLUDE_JVMCI | |
168 if (trace_codecache && !_process_strong_tasks->is_task_claimed(G1RP_PS_CodeCache_oops_do)) { | |
169 CodeCache::blobs_do(&root_code_blobs); | |
170 } | |
171 #endif | |
159 | 172 |
160 { | 173 { |
161 // Now the CM ref_processor roots. | 174 // Now the CM ref_processor roots. |
162 G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_i); | 175 G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_i); |
163 if (!_process_strong_tasks->is_task_claimed(G1RP_PS_refProcessor_oops_do)) { | 176 if (!_process_strong_tasks->is_task_claimed(G1RP_PS_refProcessor_oops_do)) { |