linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] perf bpf: Add __bpf_stdout__ support
@ 2016-04-08 15:07 Wang Nan
  2016-04-08 15:07 ` [PATCH 1/4] perf trace: Improve error message when receive non-tracepoint events Wang Nan
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Wang Nan @ 2016-04-08 15:07 UTC (permalink / raw)
  To: acme; +Cc: pi3orama, linux-kernel, lizefan, wangnan0

Hi Arnaldo,

   Following your suggestion, patch 3-4 in this patch set add __bpf_stdout__
support. If a map is called __bpf_stdout__, perf will create a bpf-output
event and attach to it automatically. Don't need to setup bpf output event
in cmdline explicitly.

 # perf record -e ./test_bpf_trace.c usleep 100000
 # ~/perf script
          usleep 25656 [003] 264724.900051:          0            __bpf_stdout__:  ffffffff810eb9a1 sys_nanosleep (/lib/modules
      BPF output: 0000: 52 61 69 73 65 20 61 20  Raise a 
                  0008: 42 50 46 20 65 76 65 6e  BPF even
                  0010: 74 21 00 00              t!..    
      BPF string: "Raise a BPF event!"

          usleep 25656 [003] 264725.000112:          0            __bpf_stdout__:  ffffffff8105d609 kretprobe_trampoline_holder
      BPF output: 0000: 52 61 69 73 65 20 61 20  Raise a 
                  0008: 42 50 46 20 65 76 65 6e  BPF even
                  0010: 74 21 00 00              t!..    
      BPF string: "Raise a BPF event!"

Wang Nan (4):
  perf trace: Improve error message when receive non-tracepoint events
  perf trace: Print content of bpf-output event
  perf bpf: Clone bpf stdout events in multiple bpf scripts
  perf bpf: Automatically create bpf-output event __bpf_stdout__

 tools/perf/builtin-record.c  |   8 +++
 tools/perf/builtin-trace.c   |  33 +++++++++-
 tools/perf/util/bpf-loader.c | 143 +++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/bpf-loader.h |  19 ++++++
 4 files changed, 202 insertions(+), 1 deletion(-)

-- 
1.8.3.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-13  7:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-08 15:07 [PATCH 0/4] perf bpf: Add __bpf_stdout__ support Wang Nan
2016-04-08 15:07 ` [PATCH 1/4] perf trace: Improve error message when receive non-tracepoint events Wang Nan
2016-04-08 15:22   ` Arnaldo Carvalho de Melo
2016-04-08 16:12     ` Wangnan (F)
2016-04-08 17:33       ` Arnaldo Carvalho de Melo
2016-04-08 15:07 ` [PATCH 2/4] perf trace: Print content of bpf-output event Wang Nan
2016-04-08 15:55   ` Wangnan (F)
2016-04-08 17:25     ` Arnaldo Carvalho de Melo
2016-04-08 15:07 ` [PATCH 3/4] perf bpf: Clone bpf stdout events in multiple bpf scripts Wang Nan
2016-04-08 17:35   ` Arnaldo Carvalho de Melo
2016-04-13  7:22   ` [tip:perf/core] " tip-bot for Wang Nan
2016-04-08 15:07 ` [PATCH 4/4] perf bpf: Automatically create bpf-output event __bpf_stdout__ Wang Nan
2016-04-08 17:54   ` Arnaldo Carvalho de Melo
2016-04-13  7:22   ` [tip:perf/core] " tip-bot for Wang Nan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).