1 /* |
1 /* |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2016, 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. |
617 ScanningOption so, |
617 ScanningOption so, |
618 OopClosure* strong_roots, |
618 OopClosure* strong_roots, |
619 OopClosure* weak_roots, |
619 OopClosure* weak_roots, |
620 CLDClosure* strong_cld_closure, |
620 CLDClosure* strong_cld_closure, |
621 CLDClosure* weak_cld_closure, |
621 CLDClosure* weak_cld_closure, |
622 CodeBlobClosure* code_roots) { |
622 CodeBlobToOopClosure* code_roots) { |
623 StrongRootsScope srs(this, activate_scope); |
623 StrongRootsScope srs(this, activate_scope); |
624 |
624 |
625 // General roots. |
625 // General roots. |
626 assert(_strong_roots_parity != 0, "must have called prologue code"); |
626 assert(_strong_roots_parity != 0, "must have called prologue code"); |
627 assert(code_roots != NULL, "code root closure should always be set"); |
627 assert(code_roots != NULL, "code root closure should always be set"); |
636 |
636 |
637 // Some CLDs contained in the thread frames should be considered strong. |
637 // Some CLDs contained in the thread frames should be considered strong. |
638 // Don't process them if they will be processed during the ClassLoaderDataGraph phase. |
638 // Don't process them if they will be processed during the ClassLoaderDataGraph phase. |
639 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL; |
639 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL; |
640 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway |
640 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway |
641 CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots; |
641 CodeBlobToOopClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots; |
642 |
642 |
643 Threads::possibly_parallel_oops_do(strong_roots, roots_from_clds_p, roots_from_code_p); |
643 Threads::possibly_parallel_oops_do(strong_roots, roots_from_clds_p, roots_from_code_p); |
644 |
644 |
645 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) { |
645 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) { |
646 Universe::oops_do(strong_roots); |
646 Universe::oops_do(strong_roots); |