Skip to content

Commit ec1cdb3

Browse files
authored
Merge pull request #51 from parca-dev/off-cpu-fix
Fix go_label unwinder to work with off cpu
2 parents 78e858b + 9cd25f5 commit ec1cdb3

File tree

5 files changed

+3
-2
lines changed

5 files changed

+3
-2
lines changed

support/ebpf/go_labels.ebpf.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ get_go_custom_labels(struct pt_regs *ctx, PerCPURecord *record, GoCustomLabelsOf
242242
return get_go_custom_labels_from_map(ctx, record, labels_ptr, offs);
243243
}
244244

245-
SEC("perf_event/go_labels")
246-
int perf_go_labels(struct pt_regs *ctx)
245+
// go_labels is the entrypoint for extracting custom labels from Go runtime.
246+
static inline __attribute__((__always_inline__)) int go_labels(struct pt_regs *ctx)
247247
{
248248
PerCPURecord *record = get_per_cpu_record();
249249
if (!record)
@@ -267,3 +267,4 @@ int perf_go_labels(struct pt_regs *ctx)
267267
tail_call(ctx, PROG_UNWIND_STOP);
268268
return 0;
269269
}
270+
MULTI_USE_FUNC(go_labels)
187 KB
Binary file not shown.
187 KB
Binary file not shown.
34.9 KB
Binary file not shown.
34.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)