Skip to content

Commit

Permalink
8319876: Reduce memory consumption of VM_ThreadDump::doit
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, stefank
  • Loading branch information
yanglong1010 authored and D-D-H committed Nov 17, 2023
1 parent bbf52e0 commit 8ec6b8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/hotspot/share/runtime/vmOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ VM_ThreadDump::VM_ThreadDump(ThreadDumpResult* result,
_result = result;
_num_threads = 0; // 0 indicates all threads
_threads = nullptr;
_result = result;
_max_depth = max_depth;
_with_locked_monitors = with_locked_monitors;
_with_locked_synchronizers = with_locked_synchronizers;
Expand All @@ -245,7 +244,6 @@ VM_ThreadDump::VM_ThreadDump(ThreadDumpResult* result,
_result = result;
_num_threads = num_threads;
_threads = threads;
_result = result;
_max_depth = max_depth;
_with_locked_monitors = with_locked_monitors;
_with_locked_synchronizers = with_locked_synchronizers;
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/services/threadService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ void ThreadStackTrace::dump_stack_at_safepoint(int maxDepth, ObjectMonitorsView*
RegisterMap::UpdateMap::include,
RegisterMap::ProcessFrames::include,
RegisterMap::WalkContinuation::skip);

ResourceMark rm(VMThread::vm_thread());
// If full, we want to print both vthread and carrier frames
vframe* start_vf = !full && _thread->is_vthread_mounted()
? _thread->carrier_last_java_vframe(&reg_map)
Expand Down

1 comment on commit 8ec6b8d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.