| 1267 | } |
| 1268 | |
| 1269 | void JNICALL Instrument::recordExit0(JNIEnv* jni, jobject unused, jlong startTimeNs) { |
| 1270 | if (!_enabled) return; |
| 1271 | |
| 1272 | if (shouldRecordSample()) { |
| 1273 | u64 now_ticks = TSC::ticks(); |
| 1274 | u64 duration_ns = OS::nanotime() - (u64) startTimeNs; |
| 1275 | u64 duration_ticks = (u64) ((double) duration_ns * TSC::frequency() / NANOTIME_FREQ); |
| 1276 | MethodTraceEvent event(now_ticks - duration_ticks, duration_ticks); |
| 1277 | Profiler::instance()->recordSample(NULL, duration_ns, METHOD_TRACE, &event); |
| 1278 | } |
| 1279 | } |
nothing calls this directly
no test coverage detected