1. 05 9月, 2016 4 次提交
  2. 01 9月, 2016 15 次提交
    • R
      perf probe: Move dwarf specific functions to dwarf-aux.c · 6243b9dc
      Ravi Bangoria 提交于
      Move generic dwarf related functions from util/probe-finder.c to
      util/dwarf-aux.c. Functions name and their prototype are also changed
      accordingly. No functionality changes.
      Suggested-and-Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1472546377-25612-1-git-send-email-ravi.bangoria@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6243b9dc
    • R
      perf uprobe: Skip prologue if program compiled without optimization · e47392bf
      Ravi Bangoria 提交于
      The function prologue prepares stack and registers before executing
      function logic.
      
      When target program is compiled without optimization, function parameter
      information is only valid after the prologue.
      
      When we probe entrypc of the function, and try to record a function
      parameter, it contains a garbage value.
      
      For example:
      
        $ vim test.c
          #include <stdio.h>
      
          void foo(int i)
          {
             printf("i: %d\n", i);
          }
      
          int main()
          {
            foo(42);
            return 0;
          }
      
        $ gcc -g test.c -o test
        $ objdump -dl test | less
          foo():
          /home/ravi/test.c:4
            400536:       55                      push   %rbp
            400537:       48 89 e5                mov    %rsp,%rbp
            40053a:       48 83 ec 10             sub    -bashx10,%rsp
            40053e:       89 7d fc                mov    %edi,-0x4(%rbp)
          /home/ravi/test.c:5
            400541:       8b 45 fc                mov    -0x4(%rbp),%eax
          ...
          ...
          main():
          /home/ravi/test.c:9
            400558:       55                      push   %rbp
            400559:       48 89 e5                mov    %rsp,%rbp
          /home/ravi/test.c:10
            40055c:       bf 2a 00 00 00          mov    -bashx2a,%edi
            400561:       e8 d0 ff ff ff          callq  400536 <foo>
      
        $ perf probe -x ./test 'foo i'
        $ cat /sys/kernel/debug/tracing/uprobe_events
           p:probe_test/foo /home/ravi/test:0x0000000000000536 i=-12(%sp):s32
      
        $ perf record -e probe_test:foo ./test
        $ perf script
           test  5778 [001]  4918.562027: probe_test:foo: (400536) i=0
      
      Here variable 'i' is passed via stack which is pushed on stack at
      0x40053e. But we are probing at 0x400536.
      
      To resolve this issues, we need to probe on next instruction after
      prologue.  gdb and systemtap also does same thing. I've implemented this
      patch based on approach systemtap has used.
      
      After applying patch:
      
        $ perf probe -x ./test 'foo i'
        $ cat /sys/kernel/debug/tracing/uprobe_events
          p:probe_test/foo /home/ravi/test:0x0000000000000541 i=-4(%bp):s32
      
        $ perf record -e probe_test:foo ./test
        $ perf script
          test  6300 [001]  5877.879327: probe_test:foo: (400541) i=42
      
      No need to skip prologue for optimized case since debug info is correct
      for each instructions for -O2 -g. For more details please visit:
      
              https://bugzilla.redhat.com/show_bug.cgi?id=612253#c6
      
      Changes in v2:
      
      - Skipping prologue only when any ARG is either C variable, $params or
        $vars.
      
      - Probe on line(:1) may not be always possible. Recommend only address
        to force probe on function entry.
      
      Committer notes:
      
      Testing it with 'perf trace':
      
        # perf probe -x ./test foo i
        Added new event:
          probe_test:foo       (on foo in /home/acme/c/test with i)
      
        You can now use it in all perf tools, such as:
      
      	  perf record -e probe_test:foo -aR sleep 1
      
        # cat /sys/kernel/debug/tracing/uprobe_events
        p:probe_test/foo /home/acme/c/test:0x0000000000000526 i=-12(%sp):s32
        # trace --no-sys --event probe_*:* ./test
        i: 42
           0.000 probe_test:foo:(400526) i=0)
        #
      
      After the patch:
      
        # perf probe -d *:*
        Removed event: probe_test:foo
        # perf probe -x ./test foo i
        Target program is compiled without optimization. Skipping prologue.
        Probe on address 0x400526 to force probing at the function entry.
      
        Added new event:
          probe_test:foo       (on foo in /home/acme/c/test with i)
      
        You can now use it in all perf tools, such as:
      
      	perf record -e probe_test:foo -aR sleep 1
      
        # cat /sys/kernel/debug/tracing/uprobe_events
        p:probe_test/foo /home/acme/c/test:0x0000000000000531 i=-4(%bp):s32
        # trace --no-sys --event probe_*:* ./test
        i: 42
           0.000 probe_test:foo:(400531) i=42)
        #
      Reported-by: NMichael Petlan <mpetlan@redhat.com>
      Report-Link: https://www.mail-archive.com/linux-perf-users@vger.kernel.org/msg02348.htmlSigned-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: NJiri Olsa <jolsa@kernel.org>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Acked-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1299021
      Link: http://lkml.kernel.org/r/1470214725-5023-2-git-send-email-ravi.bangoria@linux.vnet.ibm.com
      [ Rename 'die' to 'cu_die' to avoid shadowing a die() definition on at least centos 5, Debian 7 and ubuntu:12.04.5]
      [ Use PRIx64 instead of lx to format a Dwarf_Addr, aka long long unsigned int, fixing the build on 32-bit systems ]
      [ dwarf_getsrclines() expects a size_t * argument ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e47392bf
    • R
      perf probe: Add helper function to check if probe with variable · b3f33f93
      Ravi Bangoria 提交于
      Introduce helper function instead of inline code and replace hardcoded
      strings "$vars" and "$params" with their corresponding macros.
      
      perf_probe_with_var() is not declared as static since it will be called
      from different file in subsequent patch.
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1470214725-5023-1-git-send-email-ravi.bangoria@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b3f33f93
    • A
      perf symbols: Fixup symbol sizes before picking best ones · 432746f8
      Arnaldo Carvalho de Melo 提交于
      When we call symbol__fixup_duplicate() we use algorithms to pick the
      "best" symbols for cases where there are various functions/aliases to an
      address, and those check zero size symbols, which, before calling
      symbol__fixup_end() are _all_ symbols in a just parsed kallsyms file.
      
      So first fixup the end, then fixup the duplicates.
      
      Found while trying to figure out why 'perf test vmlinux' failed, see the
      output of 'perf test -v vmlinux' to see cases where the symbols picked
      as best for vmlinux don't match the ones picked for kallsyms.
      
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 694bf407 ("perf symbols: Add some heuristics for choosing the best duplicate symbol")
      Link: http://lkml.kernel.org/n/tip-rxqvdgr0mqjdxee0kf8i2ufn@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      432746f8
    • A
      perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too · c97b40e4
      Arnaldo Carvalho de Melo 提交于
      We can allow aliases to be kept, but we were checking this just when
      loading vmlinux files, be consistent, do it for any symbol table loading
      code that calls symbol__fixup_duplicate() by making this function check
      .allow_aliases instead.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 680d926a ("perf symbols: Allow symbol alias when loading map for symbol name")
      Link: http://lkml.kernel.org/n/tip-z0avp0s6cfjckc4xj3pdfjdz@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c97b40e4
    • A
      perf test vmlinux: Tolerate symbol aliases · 7e1b6595
      Arnaldo Carvalho de Melo 提交于
      The algorithms used to prune aliases in symbols__fixup_duplicate() uses
      information available on ELF symtabs that are not present on
      /proc/kallsyms, so it picks different aliases as "best" for vmlinux and
      kallsyms.
      
      We could probably improve a bit this by having a list of aliases for the
      "best" symbols picked, instead of throwing this info, but that is left
      for when we find a real need.
      
      With this, 'perf test vmlinux' passes:
      
        # perf test -F 1
         1: vmlinux symtab matches kallsyms: Ok
        #
      
      When we ask for verbose mode, we can see those warning:
      
        # perf test -F -v 1
         1: vmlinux symtab matches kallsyms:
        --- start ---
        Looking at the vmlinux_path (8 entries long)
        Using /lib/modules/4.8.0-rc4+/build/vmlinux for symbols
        WARN: 0xffffffffb7001000: diff name v: xen_hypercall_set_trap_table k: hypercall_page
        WARN: 0xffffffffb7077970: diff end addr for aesni_gcm_dec v: 0xffffffffb707a2f2 k: 0xffffffffb7077a02
        WARN: 0xffffffffb707a300: diff end addr for aesni_gcm_enc v: 0xffffffffb707cc03 k: 0xffffffffb707a392
        WARN: 0xffffffffb707f950: diff end addr for aesni_gcm_enc_avx_gen2 v: 0xffffffffb7084ef6 k: 0xffffffffb707f9c3
        WARN: 0xffffffffb7084f00: diff end addr for aesni_gcm_dec_avx_gen2 v: 0xffffffffb708a691 k: 0xffffffffb7084f73
        WARN: 0xffffffffb708aa10: diff end addr for aesni_gcm_enc_avx_gen4 v: 0xffffffffb708f844 k: 0xffffffffb708aa83
        WARN: 0xffffffffb708f850: diff end addr for aesni_gcm_dec_avx_gen4 v: 0xffffffffb709486f k: 0xffffffffb708f8c3
        WARN: 0xffffffffb71a6e50: diff name v: perf_pmu_commit_txn.part.98 k: perf_pmu_cancel_txn.part.97
        WARN: 0xffffffffb752e480: diff name v: wakeup_expire_count_show.part.5 k: wakeup_active_count_show.part.7
        WARN: 0xffffffffb76e8d00: diff name v: phys_switch_id_show.part.11 k: phys_port_name_show.part.12
        WARN: Maps only in vmlinux:
         ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text
         ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text
        ---- end ----
        vmlinux symtab matches kallsyms: Ok
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-6v5w1k8rpx4ggczlkw730vt0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7e1b6595
    • A
      perf test vmlinux: Avoid printing headers for empty lists · 54da0769
      Arnaldo Carvalho de Melo 提交于
      Before:
      
        # perf test -F -v 1
         1: vmlinux symtab matches kallsyms:
        --- start ---
      <SNIP>
        WARN: Maps only in vmlinux:
         ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text
         ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text
        WARN: Maps in vmlinux with a different name in kallsyms:
        WARN: Maps only in kallsyms:
        ---- end ----
        vmlinux symtab matches kallsyms: Ok
        #
      
      The two last WARN lines are now suppressed, since there are no such
      cases detected.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-9ww8uvzl682ykaw8ht1tozlr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      54da0769
    • A
      perf test vmlinux: Clarify which -v lines are errors or warning · e267769e
      Arnaldo Carvalho de Melo 提交于
      When the 'perf test -v vmlinux' test fails, it is not clear which of the
      lines are errors or warnings, clarify that adding ERR/WARN prefixes:
      
        # perf test -F -v 1
         1: vmlinux symtab matches kallsyms                          :
        --- start ---
        Looking at the vmlinux_path (8 entries long)
        Using /lib/modules/4.8.0-rc4+/build/vmlinux for symbols
        ERR : 0xffffffffb7001000: diff name v: xen_hypercall_set_trap_table k: hypercall_page
        WARN: 0xffffffffb7077970: diff end addr for aesni_gcm_dec v: 0xffffffffb707a2f2 k: 0xffffffffb7077a02
        WARN: 0xffffffffb707a300: diff end addr for aesni_gcm_enc v: 0xffffffffb707cc03 k: 0xffffffffb707a392
        WARN: 0xffffffffb707f950: diff end addr for aesni_gcm_enc_avx_gen2 v: 0xffffffffb7084ef6 k: 0xffffffffb707f9c3
        WARN: 0xffffffffb7084f00: diff end addr for aesni_gcm_dec_avx_gen2 v: 0xffffffffb708a691 k: 0xffffffffb7084f73
        WARN: 0xffffffffb708aa10: diff end addr for aesni_gcm_enc_avx_gen4 v: 0xffffffffb708f844 k: 0xffffffffb708aa83
        WARN: 0xffffffffb708f850: diff end addr for aesni_gcm_dec_avx_gen4 v: 0xffffffffb709486f k: 0xffffffffb708f8c3
        ERR : 0xffffffffb71a6e50: diff name v: perf_pmu_commit_txn.part.98 k: perf_pmu_cancel_txn.part.97
        ERR : 0xffffffffb752e480: diff name v: wakeup_expire_count_show.part.5 k: wakeup_active_count_show.part.7
        ERR : 0xffffffffb76e8d00: diff name v: phys_switch_id_show.part.11 k: phys_port_name_show.part.12
        WARN: Maps only in vmlinux:
         ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text
         ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text
        WARN: Maps in vmlinux with a different name in kallsyms:
        WARN: Maps only in kallsyms:
        ---- end ----
        vmlinux symtab matches kallsyms: FAILED!
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-n5ml8m7y9x8kzvxt09ipku88@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e267769e
    • M
      perf probe: Ignore vmlinux Build-id when offline vmlinux given · e50243bb
      Masami Hiramatsu 提交于
      Ignore vmlinux build-id when user gives offline vmlinux if the command
      does not affect running kernel.
      
      perf-probe has several actions some of them does not change the running
      kernel, like --lines, --vars, and --funcs.
      
      e.g.
        -----
        $ ./perf probe -k ./vmlinux-arm -V do_sys_open:14
        Available variables at do_sys_open:14
                @<do_sys_open+202>
                        char*   filename
                        int     dfd
                        int     fd
                        int     flags
                        struct filename*        tmp
                        struct open_flags       op
                        umode_t mode
        -----
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/147222347320.5088.2582658035296667520.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e50243bb
    • M
      perf probe: Support probing on offline cross-arch binary · 293d5b43
      Masami Hiramatsu 提交于
      Support probing on offline cross-architecture binary by adding getting
      the target machine arch from ELF and choose correct register string for
      the machine.
      
      Here is an example:
        -----
        $ perf probe --vmlinux=./vmlinux-arm --definition 'do_sys_open $params'
        p:probe/do_sys_open do_sys_open+0 dfd=%r5:s32 filename=%r1:u32 flags=%r6:s32 mode=%r3:u16
        -----
      
      Here, we can get probe/do_sys_open from above and append it to to the target
      machine's tracing/kprobe_events file in the tracefs mountput, usually
      /sys/kernel/debug/tracing/kprobe_events (or /sys/kernel/tracing/kprobe_events).
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/147214229717.23638.6440579792548044658.stgit@devbox
      [ Add definition for EM_AARCH64 to fix the build on at least centos 6, debian 7 & ubuntu 12.04.5 ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      293d5b43
    • M
      perf probe: Ignore vmlinux buildid if offline kernel is given · 428aff82
      Masami Hiramatsu 提交于
      Ignore the buildid of running kernel when both of --definition and
      --vmlinux is given because that kernel should be off-line.
      
      This also skips post-processing of kprobe event for relocating symbol
      and checking blacklist, because it can not be done on off-line kernel.
      
      E.g. without this fix perf shows an error as below
        ----
        $ perf probe --vmlinux=./vmlinux-arm --definition do_sys_open
        ./vmlinux-arm with build id 7a1f76dd56e9c4da707cd3d6333f50748141434b not found, continuing without symbols
        Failed to find symbol do_sys_open in kernel
          Error: Failed to add events.
        ----
      with this fix, we can get the definition
        ----
        $ perf probe --vmlinux=./vmlinux-arm --definition do_sys_open
        p:probe/do_sys_open do_sys_open+0
        ----
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/147214228193.23638.12581984840822162131.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      428aff82
    • M
      perf probe: Show trace event definition · 1c20b1d1
      Masami Hiramatsu 提交于
      Add --definition/-D option for showing the trace-event definition in
      stdout. This can be useful in debugging or combined with a shell script.
      
      e.g.
        ----
        # perf probe --definition 'do_sys_open $params'
        p:probe/do_sys_open _text+2261728 dfd=%di:s32 filename=%si:u64 flags=%dx:s32 mode=%cx:u16
        ----
      Suggested-and-Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/147214226712.23638.2240534040014013658.stgit@devboxSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1c20b1d1
    • M
      perf config: Show default report configuration in example and docs · 893c5c79
      Milian Wolff 提交于
      Signed-off-by: NMilian Wolff <milian.wolff@kdab.com>
      LPU-Reference: 20160830134106.21240-2-milian.wolff@kdab.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      893c5c79
    • M
      perf symbols: Demangle symbols for synthesized @plt entries. · 2a8d41b4
      Milian Wolff 提交于
      The symbols in the synthesized @plt entries where not demangled before,
      i.e. we could end up with entries such as:
      
          $ perf report
          Samples: 7K of event 'cycles:ppp', Event count (approx.): 6223833141
          Children      Self  Command          Shared Object           Symbol
          -   93.63%    28.89%  lab_mandelbrot   lab_mandelbrot        [.] main
              - 73.81% main
                  - 33.57% hypot
                    27.76% __hypot_finite
                    15.97% __muldc3
                     2.90% __muldc3@plt
                     2.40% _ZNK6QImage6heightEv@plt
                   + 2.14% QColor::rgb
                     1.94% _ZNK6QImage5widthEv@plt
                     1.92% cabs@plt
      
      This patch remedies this issue by also applying demangling to the
      synthesized symbols. The output for the above is now:
      
          $ perf report
          Samples: 7K of event 'cycles:ppp', Event count (approx.): 6223833141
          Children      Self  Command          Shared Object           Symbol
          -   93.63%    28.89%  lab_mandelbrot   lab_mandelbrot        [.] main
              - 73.81% main
                  - 33.57% hypot
                    27.76% __hypot_finite
                    15.97% __muldc3
                     2.90% __muldc3@plt
                     2.40% QImage::height() const@plt
                   + 2.14% QColor::rgb
                     1.94% QImage::width() const@plt
                     1.92% cabs@plt
      Signed-off-by: NMilian Wolff <milian.wolff@kdab.com>
      LPU-Reference: 20160830114102.30863-1-milian.wolff@kdab.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2a8d41b4
    • A
      perf probe: Do not use map_load filters for function · fd227598
      Arnaldo Carvalho de Melo 提交于
      It is simpler to just do the loop, no need for globals and the last user
      of such facility disappears.
      
      Testing:
      
        # perf probe -F [a-z]*recvmsg
        aead_recvmsg
        compat_SyS_recvmsg
        compat_sys_recvmsg
        hash_recvmsg
        inet_recvmsg
        kernel_recvmsg
        netlink_recvmsg
        packet_recvmsg
        ping_recvmsg
        raw_recvmsg
        rawv6_recvmsg
        rng_recvmsg
        security_socket_recvmsg
        selinux_socket_recvmsg
        skcipher_recvmsg
        sock_common_recvmsg
        sock_no_recvmsg
        sock_recvmsg
        sys_recvmsg
        tcp_recvmsg
        udp_recvmsg
        udpv6_recvmsg
        unix_dgram_recvmsg
        unix_seqpacket_recvmsg
        unix_stream_recvmsg
        #
      
      Without filters:
      
        # perf probe -F | tail -5
        zswap_pool_create
        zswap_pool_current
        zswap_update_total_size
        zswap_writeback_entry
        zswap_zpool_param_set
        #
        # perf probe -F | wc -l
        33311
        #
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/20160831130427.GA13095@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fd227598
  3. 30 8月, 2016 2 次提交
  4. 24 8月, 2016 19 次提交