Skip to content

Commit

Permalink
WIP: Removed debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
afek854 committed Oct 31, 2024
1 parent b5c3d72 commit 9237413
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion support/ebpf/native_stack_trace.ebpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,6 @@ int collect_trace(struct pt_regs *ctx, bpf_map_def *prog_map) {
// Get the kernel mode stack trace first
trace->kernel_stack_id = bpf_get_stackid(ctx, &kernel_stackmap, BPF_F_REUSE_STACKID);
DEBUG_PRINT("kernel stack id = %d", trace->kernel_stack_id);

// Recursive unwind frames
int unwinder = PROG_UNWIND_STOP;
bool has_usermode_regs = false;
Expand Down
3 changes: 0 additions & 3 deletions support/ebpf/tracemgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,13 @@ ErrorCode push_error(Trace *trace, ErrorCode error) {
// Send a trace to user-land via the `trace_events` perf event buffer.
static inline __attribute__((__always_inline__))
void send_trace(void *ctx, Trace *trace) {
DEBUG_PRINT("sending send_trace");
const u64 num_empty_frames = (MAX_FRAME_UNWINDS - trace->stack_len);
const u64 send_size = sizeof(Trace) - sizeof(Frame) * num_empty_frames;

if (send_size > sizeof(Trace)) {
DEBUG_PRINT("send_trace > sizeof(Trace))");
return; // unreachable
}

DEBUG_PRINT("OTEL4 registers ctx: sp %lx", trace->registers.sp);
bpf_perf_event_output(ctx, &trace_events, BPF_F_CURRENT_CPU, trace, send_size);
}

Expand Down
Binary file modified support/ebpf/tracer.ebpf.release.amd64
Binary file not shown.
4 changes: 0 additions & 4 deletions tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,6 @@ func (t *Tracer) loadBpfTrace(raw []byte) *host.Trace {
panic("unexpected record size")
}

fmt.Println("buchi")

fmt.Println("registers sp ", uint64(ptr.registers.sp), "pid ", ptr.pid)

regs := host.Regs{
R15: uint64(ptr.registers.r15),
R14: uint64(ptr.registers.r14),
Expand Down

0 comments on commit 9237413

Please sign in to comment.