MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / capture_stack

Function capture_stack

crates/memtrack/src/ebpf/c/stack_capture.bpf.h:250–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250static __always_inline __u64 capture_stack(struct pt_regs* ctx) {
251 if (!capture_stacks_enabled || !is_enabled()) {
252 return 0;
253 }
254
255 struct task_ids ids = current_task_ids();
256 if (!is_tracked(ids.tgid)) {
257 return 0;
258 }
259
260 return capture_stack_inner(ctx, ids);
261}
262
263static __always_inline void stash_stack_hash(__u64 hash) {
264 if (hash == 0) {

Callers 1

BPF_HASH_MAPFunction · 0.85

Calls 4

is_enabledFunction · 0.85
current_task_idsFunction · 0.85
is_trackedFunction · 0.85
capture_stack_innerFunction · 0.85

Tested by

no test coverage detected