1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
223 void CMSHeap::cms_process_roots(StrongRootsScope* scope, |
223 void CMSHeap::cms_process_roots(StrongRootsScope* scope, |
224 bool young_gen_as_roots, |
224 bool young_gen_as_roots, |
225 ScanningOption so, |
225 ScanningOption so, |
226 bool only_strong_roots, |
226 bool only_strong_roots, |
227 OopsInGenClosure* root_closure, |
227 OopsInGenClosure* root_closure, |
228 CLDClosure* cld_closure, |
228 CLDClosure* cld_closure) { |
229 OopStorage::ParState<false, false>* par_state_string) { |
|
230 MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations); |
229 MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations); |
231 CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure; |
230 CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure; |
232 |
231 |
233 process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure); |
232 process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure); |
234 if (!only_strong_roots) { |
|
235 process_string_table_roots(scope, root_closure, par_state_string); |
|
236 } |
|
237 |
233 |
238 if (young_gen_as_roots && |
234 if (young_gen_as_roots && |
239 _process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) { |
235 _process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) { |
240 root_closure->set_generation(young_gen()); |
236 root_closure->set_generation(young_gen()); |
241 young_gen()->oop_iterate(root_closure); |
237 young_gen()->oop_iterate(root_closure); |