MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / recordExit0

Method recordExit0

src/instrument.cpp:1269–1279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1267}
1268
1269void 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}

Callers

nothing calls this directly

Calls 1

recordSampleMethod · 0.80

Tested by

no test coverage detected