(thread: jthread, max_depth: jint)
| 471 | } |
| 472 | |
| 473 | unsafe fn get_stack_trace(thread: jthread, max_depth: jint) -> Result<Vec<jvmtiFrameInfo>, String> { |
| 474 | let mut frames: Vec<jvmtiFrameInfo> = Vec::with_capacity(max_depth as usize); |
| 475 | let mut frame_count: jint = 0; |
| 476 | let trace_res = (**JVMTI_ENV).GetStackTrace.unwrap()(JVMTI_ENV, |
| 477 | thread, |
| 478 | 0, |
| 479 | max_depth, |
| 480 | frames.as_mut_ptr(), &mut frame_count); |
| 481 | util::unit_or_jvmti_err(trace_res)?; |
| 482 | frames.set_len(frame_count as usize); |
| 483 | frames.shrink_to_fit(); |
| 484 | return Result::Ok(frames); |
| 485 | } |
| 486 | |
| 487 | unsafe fn get_frame_params(jni_env: *mut JNIEnv, thread: jthread, frame: &jvmtiFrameInfo, depth: jint) -> Result<MethodInfo, String> { |
| 488 | if log_enabled!(Trace) { trace!("Getting info for {}", method_name(frame.method)?); } |
no test coverage detected