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

Function trace_span_slot

common/trace.c:252–262  ·  view source on GitHub ↗

* Find an empty slot for a new span. */

Source from the content-addressed store, hash-verified

250 * Find an empty slot for a new span.
251 */
252static struct span *trace_span_slot(void)
253{
254 /* Look for a free fixed slot. */
255 for (size_t i = 0; i < ARRAY_SIZE(fixed_spans); i++) {
256 if (fixed_spans[i].key == 0)
257 return &fixed_spans[i];
258 }
259
260 /* Those are used up, we have to allocate. */
261 return tal(spans, struct span);
262}
263
264#define MAX_BUF_SIZE 2048
265

Callers 2

trace_inject_traceparentFunction · 0.85
trace_span_start_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected