1.1 --- a/src/share/vm/memory/genCollectedHeap.cpp Thu Sep 05 18:40:52 2019 +0800 1.2 +++ b/src/share/vm/memory/genCollectedHeap.cpp Thu Sep 05 18:52:27 2019 +0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -619,7 +619,7 @@ 1.11 OopClosure* weak_roots, 1.12 CLDClosure* strong_cld_closure, 1.13 CLDClosure* weak_cld_closure, 1.14 - CodeBlobClosure* code_roots) { 1.15 + CodeBlobToOopClosure* code_roots) { 1.16 StrongRootsScope srs(this, activate_scope); 1.17 1.18 // General roots. 1.19 @@ -638,7 +638,7 @@ 1.20 // Don't process them if they will be processed during the ClassLoaderDataGraph phase. 1.21 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL; 1.22 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway 1.23 - CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots; 1.24 + CodeBlobToOopClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots; 1.25 1.26 Threads::possibly_parallel_oops_do(strong_roots, roots_from_clds_p, roots_from_code_p); 1.27 1.28 @@ -745,14 +745,8 @@ 1.29 } 1.30 1.31 1.32 -class AlwaysTrueClosure: public BoolObjectClosure { 1.33 -public: 1.34 - bool do_object_b(oop p) { return true; } 1.35 -}; 1.36 -static AlwaysTrueClosure always_true; 1.37 - 1.38 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) { 1.39 - JNIHandles::weak_oops_do(&always_true, root_closure); 1.40 + JNIHandles::weak_oops_do(root_closure); 1.41 for (int i = 0; i < _n_gens; i++) { 1.42 _gens[i]->ref_processor()->weak_oops_do(root_closure); 1.43 }