linux/samples/bpf
Kaixu Xia 5ed3ccbd5a bpf: fix build warnings and add function read_trace_pipe()
There are two improvements in this patch:
 1. Fix the build warnings;
 2. Add function read_trace_pipe() to print the result on
    the screen;

Before this patch, we can get the result through /sys/kernel/de
bug/tracing/trace_pipe and get nothing on the screen.
By applying this patch, the result can be printed on the screen.
  $ ./tracex6
	...
         tracex6-705   [003] d..1   131.428593: : CPU-3   19981414
            sshd-683   [000] d..1   131.428727: : CPU-0   221682321
            sshd-683   [000] d..1   131.428821: : CPU-0   221808766
            sshd-683   [000] d..1   131.428950: : CPU-0   221982984
            sshd-683   [000] d..1   131.429045: : CPU-0   222111851
         tracex6-705   [003] d..1   131.429168: : CPU-3   20757551
            sshd-683   [000] d..1   131.429170: : CPU-0   222281240
            sshd-683   [000] d..1   131.429261: : CPU-0   222403340
            sshd-683   [000] d..1   131.429378: : CPU-0   222561024
	...

Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-12 16:39:12 -07:00
..
Makefile samples/bpf: example of get selected PMU counter value 2015-08-09 22:50:06 -07:00
bpf_helpers.h samples/bpf: example of get selected PMU counter value 2015-08-09 22:50:06 -07:00
bpf_load.c samples/bpf: bpf_tail_call example for tracing 2015-05-21 17:07:59 -04:00
bpf_load.h
lathist_kern.c bpf: BPF based latency tracing 2015-06-23 06:09:58 -07:00
lathist_user.c bpf: BPF based latency tracing 2015-06-23 06:09:58 -07:00
libbpf.c
libbpf.h
sock_example.c
sockex1_kern.c
sockex1_user.c
sockex2_kern.c
sockex2_user.c
sockex3_kern.c bpf: allow programs to write to certain skb fields 2015-06-07 02:01:33 -07:00
sockex3_user.c samples/bpf: bpf_tail_call example for networking 2015-05-21 17:07:59 -04:00
tcbpf1_kern.c bpf: make programs see skb->data == L2 for ingress and egress 2015-06-07 02:01:33 -07:00
test_maps.c
test_verifier.c ebpf: Allow dereferences of PTR_TO_STACK registers 2015-07-27 00:54:10 -07:00
tracex1_kern.c samples: bpf: enable trace samples for s390x 2015-07-08 15:17:45 -07:00
tracex1_user.c
tracex2_kern.c samples: bpf: enable trace samples for s390x 2015-07-08 15:17:45 -07:00
tracex2_user.c bpf: introduce current->pid, tgid, uid, gid, comm accessors 2015-06-15 15:53:50 -07:00
tracex3_kern.c samples: bpf: enable trace samples for s390x 2015-07-08 15:17:45 -07:00
tracex3_user.c
tracex4_kern.c samples: bpf: enable trace samples for s390x 2015-07-08 15:17:45 -07:00
tracex4_user.c
tracex5_kern.c samples: bpf: enable trace samples for s390x 2015-07-08 15:17:45 -07:00
tracex5_user.c samples/bpf: bpf_tail_call example for tracing 2015-05-21 17:07:59 -04:00
tracex6_kern.c bpf: fix build warnings and add function read_trace_pipe() 2015-08-12 16:39:12 -07:00
tracex6_user.c bpf: fix build warnings and add function read_trace_pipe() 2015-08-12 16:39:12 -07:00