author | pliden |
Thu, 28 Jun 2018 09:15:53 +0200 | |
changeset 50866 | cb4b07d61aac |
parent 50297 | 580744d900c8 |
child 51546 | b9f6a4427da9 |
permissions | -rw-r--r-- |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
1 |
/* |
50113 | 2 |
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
4 |
* |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
8 |
* |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
13 |
* accompanied this code). |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
14 |
* |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
18 |
* |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
21 |
* questions. |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
22 |
* |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
23 |
*/ |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
24 |
|
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
50297
580744d900c8
8202813: Move vm_weak processing from SystemDictionary to WeakProcessor
coleenp
parents:
50113
diff
changeset
|
26 |
#include "classfile/systemDictionary.hpp" |
580744d900c8
8202813: Move vm_weak processing from SystemDictionary to WeakProcessor
coleenp
parents:
50113
diff
changeset
|
27 |
#include "gc/shared/oopStorage.inline.hpp" |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
28 |
#include "gc/shared/weakProcessor.hpp" |
47649
12623954920e
8189360: JvmtiExport::weak_oops_do is called for all JNIHandleBlock instances
stefank
parents:
47648
diff
changeset
|
29 |
#include "prims/jvmtiExport.hpp" |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
30 |
#include "runtime/jniHandles.hpp" |
50113 | 31 |
#include "utilities/macros.hpp" |
32 |
#if INCLUDE_JFR |
|
33 |
#include "jfr/jfr.hpp" |
|
34 |
#endif |
|
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
35 |
|
47676
b1c020fc35a3
8189748: More precise closures for WeakProcessor::weak_oops_do calls
stefank
parents:
47649
diff
changeset
|
36 |
void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) { |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
37 |
JNIHandles::weak_oops_do(is_alive, keep_alive); |
47649
12623954920e
8189360: JvmtiExport::weak_oops_do is called for all JNIHandleBlock instances
stefank
parents:
47648
diff
changeset
|
38 |
JvmtiExport::weak_oops_do(is_alive, keep_alive); |
50297
580744d900c8
8202813: Move vm_weak processing from SystemDictionary to WeakProcessor
coleenp
parents:
50113
diff
changeset
|
39 |
SystemDictionary::vm_weak_oop_storage()->weak_oops_do(is_alive, keep_alive); |
50113 | 40 |
JFR_ONLY(Jfr::weak_oops_do(is_alive, keep_alive);) |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
41 |
} |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
42 |
|
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
43 |
void WeakProcessor::oops_do(OopClosure* closure) { |
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
44 |
AlwaysTrueClosure always_true; |
47676
b1c020fc35a3
8189748: More precise closures for WeakProcessor::weak_oops_do calls
stefank
parents:
47649
diff
changeset
|
45 |
weak_oops_do(&always_true, closure); |
47648
226b1fc611b9
8189359: Move native weak oops cleaning out of ReferenceProcessor
stefank
parents:
diff
changeset
|
46 |
} |