| 375 | } |
| 376 | |
| 377 | int Profiler::getJavaTraceJvmti(jvmtiFrameInfo* jvmti_frames, ASGCT_CallFrame* frames, int start_depth, int max_depth) { |
| 378 | int num_frames = 0; |
| 379 | if (VM::jvmti()->GetStackTrace(NULL, start_depth, max_depth, jvmti_frames, &num_frames) == 0 && num_frames > 0) { |
| 380 | // Convert to AsyncGetCallTrace format. |
| 381 | // Note: jvmti_frames and frames may overlap. |
| 382 | for (int i = 0; i < num_frames; i++) { |
| 383 | jint bci = jvmti_frames[i].location; |
| 384 | frames[i].method_id = jvmti_frames[i].method; |
| 385 | frames[i].bci = bci; |
| 386 | LP64_ONLY(frames[i].padding = 0;) |
| 387 | } |
| 388 | } |
| 389 | return num_frames; |
| 390 | } |
| 391 | |
| 392 | u64 Profiler::recordSample(void* ucontext, u64 counter, EventType event_type, Event* event) { |
| 393 | atomicInc(_total_samples); |
nothing calls this directly
no outgoing calls
no test coverage detected