Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/thread.cpp @ 14483:be0ac0e8f6e7
8035393: Use CLDClosure instead of CLDToOopClosure in frame::oops_interpreted_do
Reviewed-by: tschatzl, coleenp
author | stefank |
---|---|
date | Fri, 21 Feb 2014 10:01:20 +0100 |
parents | 2c95095271e9 |
children | f460c6926af7 |
comparison
equal
deleted
inserted
replaced
14470:f6490a5f084a | 14483:be0ac0e8f6e7 |
---|---|
824 assert(SharedHeap::heap()->workers()->active_workers() > 0, | 824 assert(SharedHeap::heap()->workers()->active_workers() > 0, |
825 "Should only fail when parallel."); | 825 "Should only fail when parallel."); |
826 return false; | 826 return false; |
827 } | 827 } |
828 | 828 |
829 void Thread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { | 829 void Thread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) { |
830 active_handles()->oops_do(f); | 830 active_handles()->oops_do(f); |
831 // Do oop for ThreadShadow | 831 // Do oop for ThreadShadow |
832 f->do_oop((oop*)&_pending_exception); | 832 f->do_oop((oop*)&_pending_exception); |
833 handle_area()->oops_do(f); | 833 handle_area()->oops_do(f); |
834 } | 834 } |
2720 _cur_thr->set_processed_thread(NULL); | 2720 _cur_thr->set_processed_thread(NULL); |
2721 } | 2721 } |
2722 } | 2722 } |
2723 }; | 2723 }; |
2724 | 2724 |
2725 void JavaThread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { | 2725 void JavaThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) { |
2726 // Verify that the deferred card marks have been flushed. | 2726 // Verify that the deferred card marks have been flushed. |
2727 assert(deferred_card_mark().is_empty(), "Should be empty during GC"); | 2727 assert(deferred_card_mark().is_empty(), "Should be empty during GC"); |
2728 | 2728 |
2729 // The ThreadProfiler oops_do is done from FlatProfiler::oops_do | 2729 // The ThreadProfiler oops_do is done from FlatProfiler::oops_do |
2730 // since there may be more than one thread using each ThreadProfiler. | 2730 // since there may be more than one thread using each ThreadProfiler. |
3243 #ifndef PRODUCT | 3243 #ifndef PRODUCT |
3244 _ideal_graph_printer = NULL; | 3244 _ideal_graph_printer = NULL; |
3245 #endif | 3245 #endif |
3246 } | 3246 } |
3247 | 3247 |
3248 void CompilerThread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { | 3248 void CompilerThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) { |
3249 JavaThread::oops_do(f, cld_f, cf); | 3249 JavaThread::oops_do(f, cld_f, cf); |
3250 if (_scanned_nmethod != NULL && cf != NULL) { | 3250 if (_scanned_nmethod != NULL && cf != NULL) { |
3251 // Safepoints can occur when the sweeper is scanning an nmethod so | 3251 // Safepoints can occur when the sweeper is scanning an nmethod so |
3252 // process it here to make sure it isn't unloaded in the middle of | 3252 // process it here to make sure it isn't unloaded in the middle of |
3253 // a scan. | 3253 // a scan. |
4139 // In particular, these things should never be called when the Threads_lock | 4139 // In particular, these things should never be called when the Threads_lock |
4140 // is held by some other thread. (Note: the Safepoint abstraction also | 4140 // is held by some other thread. (Note: the Safepoint abstraction also |
4141 // uses the Threads_lock to guarantee this property. It also makes sure that | 4141 // uses the Threads_lock to guarantee this property. It also makes sure that |
4142 // all threads gets blocked when exiting or starting). | 4142 // all threads gets blocked when exiting or starting). |
4143 | 4143 |
4144 void Threads::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { | 4144 void Threads::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) { |
4145 ALL_JAVA_THREADS(p) { | 4145 ALL_JAVA_THREADS(p) { |
4146 p->oops_do(f, cld_f, cf); | 4146 p->oops_do(f, cld_f, cf); |
4147 } | 4147 } |
4148 VMThread::vm_thread()->oops_do(f, cld_f, cf); | 4148 VMThread::vm_thread()->oops_do(f, cld_f, cf); |
4149 } | 4149 } |
4150 | 4150 |
4151 void Threads::possibly_parallel_oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { | 4151 void Threads::possibly_parallel_oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) { |
4152 // Introduce a mechanism allowing parallel threads to claim threads as | 4152 // Introduce a mechanism allowing parallel threads to claim threads as |
4153 // root groups. Overhead should be small enough to use all the time, | 4153 // root groups. Overhead should be small enough to use all the time, |
4154 // even in sequential code. | 4154 // even in sequential code. |
4155 SharedHeap* sh = SharedHeap::heap(); | 4155 SharedHeap* sh = SharedHeap::heap(); |
4156 // Cannot yet substitute active_workers for n_par_threads | 4156 // Cannot yet substitute active_workers for n_par_threads |