From 643abb526c3e6e64e36ad5bcff46f5c691812ad9 Mon Sep 17 00:00:00 2001
Date: Wed, 27 May 2026 17:46:54 +0800
Subject: Add lost RsourceMark in jBoltManager
src/hotspot/share/jbolt/jBoltCallGraph.cpp | 5 +++--
src/hotspot/share/jbolt/jBoltManager.cpp | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
@@ -193,7 +193,6 @@ JBoltCallGraph& JBoltCallGraph::callgraph_instance() {
void JBoltCallGraph::add_func(JBoltFunc* func) {
JBoltCluster* cluster = find_cluster(func);
assert(cluster != NULL, "invariant");
- delete func;
}
void JBoltCallGraph::add_call(JBoltCall* call) {
@@ -471,10 +470,12 @@ void JBoltCall::set_call_count(u4 call_count) { _call_count = call_count;
JBoltCall* JBoltCall::constructor(const JBoltFunc* caller_func, const JBoltFunc* callee_func, u4 call_count, traceid stacktrace_id) {
JBoltCall *ret = new JBoltCall(*caller_func, *callee_func, call_count, stacktrace_id);
+ delete caller_func;
+ delete callee_func;
return ret;
}
JBoltCall* JBoltCall::copy_constructor(const JBoltCall* call) {
JBoltCall *ret = new JBoltCall(*call);
return ret;
-}
\ No newline at end of file
+}
@@ -397,7 +397,7 @@ void JBoltManager::construct_stacktrace(const JfrStackTrace& stacktrace) {
*/
void JBoltManager::construct_cg_once() {
guarantee((UseJBolt && JBoltManager::reorder_phase_is_profiling_or_waiting()), "sanity");
-
+ ResourceMark rm;
GrowableArray<JfrStackTrace*>* traces = create_growable_array<JfrStackTrace*>();
{
@@ -1435,4 +1435,4 @@ void JBoltManager::print_code_heaps() {
}
}
-#undef B_TF
\ No newline at end of file
+#undef B_TF
--
2.17.1