MCPcopy Create free account
hub / github.com/ElementsProject/lightning / trace_span_clear

Function trace_span_clear

common/trace.c:325–338  ·  view source on GitHub ↗

* Release the span back into the pool of available spans. */

Source from the content-addressed store, hash-verified

323 * Release the span back into the pool of available spans.
324 */
325static void trace_span_clear(struct span *s)
326{
327 if (!span_htable_del(spans, s))
328 abort();
329
330 /* If s is actually in fixed_spans, just zero it out. */
331 if (s >= fixed_spans && s < fixed_spans + ARRAY_SIZE(fixed_spans)) {
332 s->key = 0;
333 return;
334 }
335
336 /* Dynamically allocated, so we need to free it */
337 tal_free(s);
338}
339
340void trace_span_start_(const char *name, const void *key)
341{

Callers 2

trace_inject_traceparentFunction · 0.85
trace_span_endFunction · 0.85

Calls 2

abortFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected