Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374283

[PATCH 0/4] perf bpf: Add __bpf_stdout__ support

From Wang Nan <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject [PATCH 0/4] perf bpf: Add __bpf_stdout__ support
Date 2016-04-08 17:10 +0200
Message-ID <rlGcO-5Mb-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] perf bpf: Add __bpf_stdout__ support Wang Nan <wangnan0@huawei.com> - 2016-04-08 17:10 +0200
  [PATCH 1/4] perf trace: Improve error message when receive non-tracepoint events Wang Nan <wangnan0@huawei.com> - 2016-04-08 17:10 +0200
    Re: [PATCH 1/4] perf trace: Improve error message when receive  non-tracepoint events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-08 17:30 +0200
      Re: [PATCH 1/4] perf trace: Improve error message when receive  non-tracepoint events "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-08 18:20 +0200
        Re: [PATCH 1/4] perf trace: Improve error message when receive  non-tracepoint events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-08 19:40 +0200
  [PATCH 2/4] perf trace: Print content of bpf-output event Wang Nan <wangnan0@huawei.com> - 2016-04-08 17:10 +0200
    Re: [PATCH 2/4] perf trace: Print content of bpf-output event "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-08 18:00 +0200
      Re: [PATCH 2/4] perf trace: Print content of bpf-output event Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-08 19:30 +0200
  [PATCH 3/4] perf bpf: Clone bpf stdout events in multiple bpf scripts Wang Nan <wangnan0@huawei.com> - 2016-04-08 17:20 +0200
    Re: [PATCH 3/4] perf bpf: Clone bpf stdout events in multiple bpf  scripts Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-08 19:40 +0200
    [tip:perf/core] perf bpf: Clone bpf stdout events in multiple bpf  scripts tip-bot for Wang Nan <tipbot@zytor.com> - 2016-04-13 09:30 +0200
  [PATCH 4/4] perf bpf: Automatically create bpf-output event __bpf_stdout__ Wang Nan <wangnan0@huawei.com> - 2016-04-08 17:20 +0200
    Re: [PATCH 4/4] perf bpf: Automatically create bpf-output event  __bpf_stdout__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-08 20:00 +0200
    [tip:perf/core] perf bpf: Automatically create bpf-output event  __bpf_stdout__ tip-bot for Wang Nan <tipbot@zytor.com> - 2016-04-13 09:30 +0200

csiph-web