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

Method storeCallTrace

src/callTraceStorage.cpp:203–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203CallTrace* CallTraceStorage::storeCallTrace(int num_frames, ASGCT_CallFrame* frames) {
204 const size_t header_size = sizeof(CallTrace) - sizeof(ASGCT_CallFrame);
205 CallTrace* buf = (CallTrace*)_allocator.alloc(header_size + num_frames * sizeof(ASGCT_CallFrame));
206 if (buf != NULL) {
207 buf->num_frames = num_frames;
208 // Do not use memcpy inside signal handler
209 for (int i = 0; i < num_frames; i++) {
210 buf->frames[i] = frames[i];
211 }
212 }
213 return buf;
214}
215
216CallTrace* CallTraceStorage::findCallTrace(LongHashTable* table, u64 hash) {
217 u64* keys = table->keys();

Callers

nothing calls this directly

Calls 1

allocMethod · 0.45

Tested by

no test coverage detected