Skip to content

Commit a3e40b3

Browse files
committed
Report correct PID from LuaJIT unwinder (#229)
1 parent b5e83a0 commit a3e40b3

3 files changed

Lines changed: 2 additions & 1 deletion

File tree

support/ebpf/luajit_tracer.ebpf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ find_context(struct pt_regs *ctx, PerCPURecord *record, const LuaJITProcInfo *in
510510
// Once the HA fills in text_section_bias with G we'll stop sending these report_pids.
511511
if (state->text_section_bias == 0) {
512512
DEBUG_PRINT("lj: unwinding unmapped JIT frame");
513-
report_pid(ctx, record->trace.pid, RATELIMIT_ACTION_DEFAULT);
513+
u64 pid_tgid = (u64)record->trace.pid << 32 | record->trace.tid;
514+
report_pid(ctx, pid_tgid, RATELIMIT_ACTION_DEFAULT);
514515

515516
// If top frame isn't luajit we can't rely on the register still holding the DISPATCH table,
516517
// but once we propagate G to the HA text_section_bias will be set to the G pointer and we can

support/ebpf/tracer.ebpf.amd64

336 Bytes
Binary file not shown.

support/ebpf/tracer.ebpf.arm64

344 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)