8369440: Remove RootResolverMarkScope and RootSetClosureMarkScope

Reviewed-by: ayang
This commit is contained in:
Francesco Andreuzzi 2025-10-11 06:13:13 +00:00 committed by SendaoYan
parent 2dfe4586f7
commit 9b99bc8ef5
6 changed files with 0 additions and 85 deletions

View File

@ -45,7 +45,6 @@
#include "gc/shared/scavengableNMethods.hpp"
#include "gc/shared/space.hpp"
#include "gc/shared/spaceDecorator.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "gc/shared/weakProcessor.hpp"
#include "logging/log.hpp"
#include "memory/iterator.inline.hpp"

View File

@ -56,7 +56,6 @@
#include "gc/shared/oopStorageSet.inline.hpp"
#include "gc/shared/scavengableNMethods.hpp"
#include "gc/shared/space.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "gc/shared/suspendibleThreadSet.hpp"
#include "gc/shared/weakProcessor.hpp"
#include "gc/shared/workerThread.hpp"

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "classfile/stringTable.hpp"
#include "code/nmethod.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "runtime/threads.hpp"
MarkScope::MarkScope() {
nmethod::oops_do_marking_prologue();
}
MarkScope::~MarkScope() {
nmethod::oops_do_marking_epilogue();
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_GC_SHARED_STRONGROOTSSCOPE_HPP
#define SHARE_GC_SHARED_STRONGROOTSSCOPE_HPP
#include "memory/allocation.hpp"
class MarkScope : public StackObj {
protected:
MarkScope();
~MarkScope();
};
#endif // SHARE_GC_SHARED_STRONGROOTSSCOPE_HPP

View File

@ -26,7 +26,6 @@
#include "classfile/stringTable.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "gc/shared/oopStorageSet.inline.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "jfr/leakprofiler/chains/bfsClosure.hpp"
#include "jfr/leakprofiler/chains/dfsClosure.hpp"
#include "jfr/leakprofiler/chains/edgeQueue.hpp"
@ -61,8 +60,6 @@ void RootSetClosure<Delegate>::do_oop(narrowOop* ref) {
}
}
class RootSetClosureMarkScope : public MarkScope {};
template <typename Delegate>
class RawRootClosure : public OopClosure {
Delegate* _delegate;
@ -89,8 +86,6 @@ public:
template <typename Delegate>
void RootSetClosure<Delegate>::process() {
RootSetClosureMarkScope mark_scope;
CLDToOopClosure cldt_closure(this, ClassLoaderData::_claim_none);
ClassLoaderDataGraph::always_strong_cld_do(&cldt_closure);

View File

@ -26,7 +26,6 @@
#include "classfile/stringTable.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "gc/shared/oopStorageSet.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "jfr/leakprofiler/checkpoint/rootResolver.hpp"
#include "jfr/leakprofiler/utilities/unifiedOopRef.inline.hpp"
#include "jfr/utilities/jfrThreadIterator.hpp"
@ -325,12 +324,7 @@ bool ReferenceToThreadRootClosure::do_thread_roots(JavaThread* jt) {
return false;
}
class RootResolverMarkScope : public MarkScope {
};
void RootResolver::resolve(RootCallback& callback) {
RootResolverMarkScope mark_scope;
// thread local roots
ReferenceToThreadRootClosure rtrc(callback);
if (rtrc.complete()) {