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

Method tryResetCounters

src/profiler.cpp:549–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void Profiler::tryResetCounters() {
550 // Reset counters only for non-JFR recording, otherwise resetting may cause missing stack traces for some
551 // allocation events and skewed incorrect number of samples.
552 // In JFR recording, each sample is recorded individually, so accumulated counters are not actually used.
553 if (!_jfr.active()) {
554 _call_trace_storage.resetCounters();
555 }
556}
557
558void Profiler::writeLog(LogLevel level, const char* message) {
559 _jfr.recordLog(level, message, strlen(message));

Callers 1

dumpMethod · 0.80

Calls 2

activeMethod · 0.80
resetCountersMethod · 0.80

Tested by

no test coverage detected