Skip to content

Commit 342ae64

Browse files
Long YangDamonFool
authored andcommitted
8319876: Reduce memory consumption of VM_ThreadDump::doit
Reviewed-by: phh Backport-of: 8ec6b8de3bb3d7aeebdcb45d761b18cce3bab75e
1 parent 4c7b1d9 commit 342ae64

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/hotspot/share/runtime/vmOperations.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ VM_ThreadDump::VM_ThreadDump(ThreadDumpResult* result,
230230
_result = result;
231231
_num_threads = 0; // 0 indicates all threads
232232
_threads = nullptr;
233-
_result = result;
234233
_max_depth = max_depth;
235234
_with_locked_monitors = with_locked_monitors;
236235
_with_locked_synchronizers = with_locked_synchronizers;
@@ -245,7 +244,6 @@ VM_ThreadDump::VM_ThreadDump(ThreadDumpResult* result,
245244
_result = result;
246245
_num_threads = num_threads;
247246
_threads = threads;
248-
_result = result;
249247
_max_depth = max_depth;
250248
_with_locked_monitors = with_locked_monitors;
251249
_with_locked_synchronizers = with_locked_synchronizers;

src/hotspot/share/services/threadService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ void ThreadStackTrace::dump_stack_at_safepoint(int maxDepth, ObjectMonitorsView*
696696
RegisterMap::UpdateMap::include,
697697
RegisterMap::ProcessFrames::include,
698698
RegisterMap::WalkContinuation::skip);
699-
699+
ResourceMark rm;
700700
// If full, we want to print both vthread and carrier frames
701701
vframe* start_vf = !full && _thread->is_vthread_mounted()
702702
? _thread->carrier_last_java_vframe(&reg_map)

0 commit comments

Comments
 (0)