Skip to content

Commit

Permalink
Don't set custom labels ID if we failed to save the hash (#2915)
Browse files Browse the repository at this point in the history
Co-authored-by: Tommy Reilly <[email protected]>
  • Loading branch information
umanwizard and gnurizen authored Jul 9, 2024
1 parent f836934 commit 2815ded
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bpf/unwinders/native.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ static __always_inline void add_stack(struct bpf_perf_event_data *ctx, u64 pid_t
int err = bpf_map_update_elem(&custom_labels, &hash, lbls, BPF_ANY);
if (err)
LOG("[error] failed to update custom labels with %d", err);
stack_key->custom_labels_id = hash;
else
stack_key->custom_labels_id = hash;
} else
LOG("[error] failed to compute hash for custom labels");
} else {
Expand Down

0 comments on commit 2815ded

Please sign in to comment.