Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 20282:f3aeae1f9fc5
8048269: Add flag to turn off class unloading after G1 concurrent mark
Summary: Added -XX:+/-ClassUnloadingWithConcurrentMark
Reviewed-by: jmasa, brutisso, mgerdin
author | stefank |
---|---|
date | Wed, 06 Aug 2014 09:55:16 +0200 |
parents | 870c03421152 |
children | e0954897238a a22acf6d7598 |
comparison
equal
deleted
inserted
replaced
20281:684a5dec6072 | 20282:f3aeae1f9fc5 |
---|---|
4858 CodeBlobClosure* strong_code_cl; | 4858 CodeBlobClosure* strong_code_cl; |
4859 | 4859 |
4860 if (_g1h->g1_policy()->during_initial_mark_pause()) { | 4860 if (_g1h->g1_policy()->during_initial_mark_pause()) { |
4861 // We also need to mark copied objects. | 4861 // We also need to mark copied objects. |
4862 strong_root_cl = &scan_mark_root_cl; | 4862 strong_root_cl = &scan_mark_root_cl; |
4863 weak_root_cl = &scan_mark_weak_root_cl; | |
4864 strong_cld_cl = &scan_mark_cld_cl; | 4863 strong_cld_cl = &scan_mark_cld_cl; |
4865 weak_cld_cl = &scan_mark_weak_cld_cl; | |
4866 strong_code_cl = &scan_mark_code_cl; | 4864 strong_code_cl = &scan_mark_code_cl; |
4865 if (ClassUnloadingWithConcurrentMark) { | |
4866 weak_root_cl = &scan_mark_weak_root_cl; | |
4867 weak_cld_cl = &scan_mark_weak_cld_cl; | |
4868 } else { | |
4869 weak_root_cl = &scan_mark_root_cl; | |
4870 weak_cld_cl = &scan_mark_cld_cl; | |
4871 } | |
4867 } else { | 4872 } else { |
4868 strong_root_cl = &scan_only_root_cl; | 4873 strong_root_cl = &scan_only_root_cl; |
4869 weak_root_cl = &scan_only_root_cl; | 4874 weak_root_cl = &scan_only_root_cl; |
4870 strong_cld_cl = &scan_only_cld_cl; | 4875 strong_cld_cl = &scan_only_cld_cl; |
4871 weak_cld_cl = &scan_only_cld_cl; | 4876 weak_cld_cl = &scan_only_cld_cl; |
4932 // First scan the shared roots. | 4937 // First scan the shared roots. |
4933 double ext_roots_start = os::elapsedTime(); | 4938 double ext_roots_start = os::elapsedTime(); |
4934 double closure_app_time_sec = 0.0; | 4939 double closure_app_time_sec = 0.0; |
4935 | 4940 |
4936 bool during_im = _g1h->g1_policy()->during_initial_mark_pause(); | 4941 bool during_im = _g1h->g1_policy()->during_initial_mark_pause(); |
4942 bool trace_metadata = during_im && ClassUnloadingWithConcurrentMark; | |
4937 | 4943 |
4938 BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots); | 4944 BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots); |
4939 BufferingOopClosure buf_scan_non_heap_weak_roots(scan_non_heap_weak_roots); | 4945 BufferingOopClosure buf_scan_non_heap_weak_roots(scan_non_heap_weak_roots); |
4940 | 4946 |
4941 process_roots(false, // no scoping; this is parallel code | 4947 process_roots(false, // no scoping; this is parallel code |
4942 SharedHeap::SO_None, | 4948 SharedHeap::SO_None, |
4943 &buf_scan_non_heap_roots, | 4949 &buf_scan_non_heap_roots, |
4944 &buf_scan_non_heap_weak_roots, | 4950 &buf_scan_non_heap_weak_roots, |
4945 scan_strong_clds, | 4951 scan_strong_clds, |
4946 // Initial Mark handles the weak CLDs separately. | 4952 // Unloading Initial Marks handle the weak CLDs separately. |
4947 (during_im ? NULL : scan_weak_clds), | 4953 (trace_metadata ? NULL : scan_weak_clds), |
4948 scan_strong_code); | 4954 scan_strong_code); |
4949 | 4955 |
4950 // Now the CM ref_processor roots. | 4956 // Now the CM ref_processor roots. |
4951 if (!_process_strong_tasks->is_task_claimed(G1H_PS_refProcessor_oops_do)) { | 4957 if (!_process_strong_tasks->is_task_claimed(G1H_PS_refProcessor_oops_do)) { |
4952 // We need to treat the discovered reference lists of the | 4958 // We need to treat the discovered reference lists of the |
4954 // (which are added by the marking threads) on them live | 4960 // (which are added by the marking threads) on them live |
4955 // until they can be processed at the end of marking. | 4961 // until they can be processed at the end of marking. |
4956 ref_processor_cm()->weak_oops_do(&buf_scan_non_heap_roots); | 4962 ref_processor_cm()->weak_oops_do(&buf_scan_non_heap_roots); |
4957 } | 4963 } |
4958 | 4964 |
4959 if (during_im) { | 4965 if (trace_metadata) { |
4960 // Barrier to make sure all workers passed | 4966 // Barrier to make sure all workers passed |
4961 // the strong CLD and strong nmethods phases. | 4967 // the strong CLD and strong nmethods phases. |
4962 active_strong_roots_scope()->wait_until_all_workers_done_with_threads(n_par_threads()); | 4968 active_strong_roots_scope()->wait_until_all_workers_done_with_threads(n_par_threads()); |
4963 | 4969 |
4964 // Now take the complement of the strong CLDs. | 4970 // Now take the complement of the strong CLDs. |