Skip to content

Commit

Permalink
8261448: Preserve GC stack watermark across safepoints in StackWalk
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Kennke committed Feb 10, 2021
1 parent ef7ee3f commit 72f20e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hotspot/share/prims/stackwalk.cpp
Expand Up @@ -38,6 +38,7 @@
#include "runtime/globals.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/keepStackGCProcessed.hpp"
#include "runtime/stackWatermarkSet.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vframe.inline.hpp"
Expand Down Expand Up @@ -488,7 +489,7 @@ jint StackWalk::fetchNextBatch(Handle stackStream, jlong mode, jlong magic,
// an accurate hint suggesting the depth of the stack walk, and 2) we are not just
// peeking at a few frames. Take the cost of flushing out any pending deferred GC
// processing of the stack.
StackWatermarkSet::finish_processing(jt, NULL /* context */, StackWatermarkKind::gc);
KeepStackGCProcessedMark keep_stack(jt);
stream.next(); // advance past the last frame decoded in previous batch
if (!stream.at_end()) {
int n = fill_in_frames(mode, stream, frame_count, start_index,
Expand Down

0 comments on commit 72f20e1

Please sign in to comment.