Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions ddprof-lib/src/main/cpp/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ void Profiler::recordSample(void* ucontext, u64 counter, int tid, jint event_typ
u32 call_trace_id = 0;
if (!_omit_stacktraces) {
ASGCT_CallFrame *frames = _calltrace_buffer[lock_index]->_asgct_frames;
jvmtiFrameInfo *jvmti_frames = _calltrace_buffer[lock_index]->_jvmti_frames;

int num_frames = 0;

Expand All @@ -675,15 +674,6 @@ void Profiler::recordSample(void* ucontext, u64 counter, int tid, jint event_typ
}
}
num_frames += java_frames;
} else if (event_type >= BCI_ALLOC_OUTSIDE_TLAB && VMStructs::_get_stack_trace != NULL) {
// Object allocation in HotSpot happens at known places where it is safe to call JVM TI,
// but not directly, since the thread is in_vm rather than in_native
num_frames += getJavaTraceInternal(jvmti_frames + num_frames, frames + num_frames, _max_stack_depth);
} else if (event_type >= BCI_ALLOC_OUTSIDE_TLAB && !VM::isOpenJ9()) {
num_frames += getJavaTraceAsync(ucontext, frames + num_frames, _max_stack_depth, &java_ctx, &truncated);
} else {
// Lock events can safely call synchronous JVM TI stack walker.
num_frames += getJavaTraceJvmti(jvmti_frames + num_frames, frames + num_frames, 0, _max_stack_depth);
}

if (num_frames == 0) {
Expand Down
3 changes: 1 addition & 2 deletions ddprof-lib/src/main/cpp/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ enum EventMask {
EM_ALLOC = 1 << 2
};

union CallTraceBuffer {
struct CallTraceBuffer {
ASGCT_CallFrame _asgct_frames[1];
jvmtiFrameInfo _jvmti_frames[1];
};


Expand Down