src/hotspot/share/gc/shared/weakProcessor.cpp
changeset 50113 caf115bb98ad
parent 47779 24022215d092
child 50297 580744d900c8
equal deleted inserted replaced
50112:7a2a740815b7 50113:caf115bb98ad
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2018, 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.
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/shared/weakProcessor.hpp"
    26 #include "gc/shared/weakProcessor.hpp"
    27 #include "prims/jvmtiExport.hpp"
    27 #include "prims/jvmtiExport.hpp"
    28 #include "runtime/jniHandles.hpp"
    28 #include "runtime/jniHandles.hpp"
    29 #include "trace/tracing.hpp"
    29 #include "utilities/macros.hpp"
    30 #include "trace/traceMacros.hpp"
    30 #if INCLUDE_JFR
       
    31 #include "jfr/jfr.hpp"
       
    32 #endif
    31 
    33 
    32 void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) {
    34 void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) {
    33   JNIHandles::weak_oops_do(is_alive, keep_alive);
    35   JNIHandles::weak_oops_do(is_alive, keep_alive);
    34   JvmtiExport::weak_oops_do(is_alive, keep_alive);
    36   JvmtiExport::weak_oops_do(is_alive, keep_alive);
    35   TRACE_WEAK_OOPS_DO(is_alive, keep_alive);
    37   JFR_ONLY(Jfr::weak_oops_do(is_alive, keep_alive);)
    36 }
    38 }
    37 
    39 
    38 void WeakProcessor::oops_do(OopClosure* closure) {
    40 void WeakProcessor::oops_do(OopClosure* closure) {
    39   AlwaysTrueClosure always_true;
    41   AlwaysTrueClosure always_true;
    40   weak_oops_do(&always_true, closure);
    42   weak_oops_do(&always_true, closure);