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

Method add

src/wallClock.cpp:73–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 void add(u64 trace) {
74 ThreadCpuTime& t = _ringbuf[atomicInc(_write_ptr) & (RINGBUF_SIZE - 1)];
75 t.trace = trace;
76 storeRelease(t.cpu_time, OS::threadCpuTime(0));
77 }
78
79 void drain(ThreadSleepMap& thread_sleep_state) {
80 u64 read_limit = _read_ptr + RINGBUF_SIZE;

Callers 1

signalHandlerMethod · 0.45

Calls 2

atomicIncFunction · 0.85
storeReleaseFunction · 0.85

Tested by

no test coverage detected