kernel-ark/samples
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
..
bpf bpf: fix build warnings and add function read_trace_pipe() 2015-08-12 16:39:12 -07:00
hidraw HID: samples/hidraw: make it possible to select device 2015-03-15 10:11:21 -04:00
hw_breakpoint perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
kdb kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
kfifo kfifo API type safety 2013-11-15 09:32:23 +09:00
kobject samples/kobject: be explicit in the module license 2015-03-25 13:41:42 +01:00
kprobes kprobes: update jprobe_example.c for do_fork() change 2014-09-26 11:11:12 +02:00
livepatch livepatch: rename config to CONFIG_LIVEPATCH 2015-02-04 11:25:51 +01:00
pktgen pktgen: add benchmark script pktgen_bench_xmit_mode_netif_receive.sh 2015-05-22 23:59:17 -04:00
rpmsg misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
seccomp samples/seccomp: improve label helper 2015-02-17 14:34:55 -08:00
trace_events tracing: Fix sample output of dynamic arrays 2015-07-17 14:15:13 -04:00
uhid HID: uhid: improve uhid example client 2013-09-04 11:35:14 +02:00
Kconfig livepatch: rename config to CONFIG_LIVEPATCH 2015-02-04 11:25:51 +01:00
Makefile livepatch: samples: add sample live patching module 2014-12-22 15:40:49 +01:00