On Tue, 24 Jan 2017 10:52:39 +0100 Jesper Dangaard Brouer <bro...@redhat.com> wrote:
> Hi IOvisor-group, > > I'm playing with kernels samples/bpf, and want so advice on debugging > eBPF programs. > > First question: I noticed bpf_trace_printk(), but nothing shows up when > I'm using it... what did I miss/forget? (So, let me answer my own question.) The trace "printk" output goes into: /sys/kernel/debug/tracing/trace_pipe And samples/bpf have a function read_trace_pipe() that reads from this. > Second question: When doing some mistake the eBPF validator does not > like, I get a dump of eBPF asm codes, which I cannot correlate to line > number in the pseudo-C code. Is there some debug option I can enable > to get some more help? (Saw William had some additional ";" output) Third question: Sometimes I get an error while loading the program like: $ sudo ./tracex1 bpf_load_program() err=22 How do I lookup what err=N means? -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer _______________________________________________ iovisor-dev mailing list iovisor-dev@lists.iovisor.org https://lists.iovisor.org/mailman/listinfo/iovisor-dev