1. 13 3月, 2015 4 次提交
  2. 12 3月, 2015 14 次提交
    • D
      perf probe: Fix compiles due to declarations using perf_probe_point · 6d4a4896
      David Ahern 提交于
      perf fails to build with gcc "(GCC) 4.4.7 20120313 (Red Hat
      4.4.7-4.0.9)" (a.k.a., RHEL6 / CentOS 6 / OL 6):
      
        cc1: warnings being treated as errors
        util/probe-event.c: In function ‘get_alternative_line_range’:
        util/probe-event.c:359: error: missing initializer
        util/probe-event.c:359: error: (near initialization for ‘pp.file’)
        util/probe-event.c:359: error: missing initializer
        util/probe-event.c:359: error: (near initialization for ‘result.function’)
      
      Fix by bringing in initializers to declaration.
      Signed-off-by: NDavid Ahern <david.ahern@oracle.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Link: http://lkml.kernel.org/r/1426084580-60780-1-git-send-email-david.ahern@oracle.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6d4a4896
    • H
      perf hists browser: Fix UI bug after zoom into thread/dso/symbol · a8cd1f43
      He Kuang 提交于
      When zoom into thread/dso/symbol, the fold/unfold stat is cleared in
      hists__filter_by_thread/dso/symbol(), but h->nr_rows is not cleared. So
      if we toggle fold stat on the unfold entires, nr_entries got a wrong
      value.
      
      This bug can be reproduced as follows:
      
      $ perf record -g -e syscalls:sys_enter_open ls
      $ perf report
      
          Children      Self  Command  Shared Object            Symbol
        ================================================================
        +   50.00%     0.00%  ls       ld64.so  [.]  _dl_get_ready_to_run
        -   50.00%     0.00%  ls       ld64.so  [.]  _dl_load_shared_library
            _dl_load_shared_library <= [Zoom into thread/dso]
            _dl_get_ready_to_run
            _start
        ...
      
      In the new thread hists, all entries reset to fold, if we unfold the
      same entry as we previously unfolded, nr_entries got wrong value, and we
      can't move down cursor to bottom row.
      
                                                               Thread: ls
          Children      Self  Command  Shared Object            Symbol
        ================================================================
        +   50.00%     0.00%  ls       ld64.so  [.]  _dl_get_ready_to_run
        -   50.00%     0.00%  ls       ld64.so  [.]  _dl_load_shared_library
            _dl_load_shared_library
            _dl_get_ready_to_run <= [cursor may stop here, can't move down]
            _start
        ...
      
      This patch clear h->nr_rows to fix this bug.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1426077363-855-2-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a8cd1f43
    • H
      perf probe: Fix possible double free on error · a78604de
      He Kuang 提交于
      A double free occurred when get source file path failed. If lr->path
      failed to assign a new value, it will be freed as the old path and then
      be freed again during line_range__clear(), and causes this:
      
        $ perf probe -L do_execve -k vmlinux
        *** Error in `/usr/bin/perf': double free or corruption (fasttop):
            0x0000000000a9ac50 ***
        ======= Backtrace: =========
        ../lib64/libc.so.6(+0x6eeef)[0x7ffff5e44eef]
        ../lib64/libc.so.6(+0x78cae)[0x7ffff5e4ecae]
        ../lib64/libc.so.6(+0x79987)[0x7ffff5e4f987]
        ../bin/perf[0x4ab41f]
        ...
      
      This patch fix this problem.
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1425463302-1687-1-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a78604de
    • A
      perf tools: Output feature detection's gcc output to a file · 443a7054
      Arnaldo Carvalho de Melo 提交于
      So that we can debug feature detection problems.
      
      It will appear on $(OUTPUT)feature-checks/.make-libbabeltrace.output,
      using the libbabeltrace feature test.
      
      Whole process:
      
        [acme@ssdandy linux]$ make -C tools/perf install-bin
        make: Entering directory `/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j8' parallel build
        config/Makefile:425: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
        config/Makefile:709: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libunwind: [ OFF ]
        ...            libdw-dwarf-unwind: [ on  ]
        ...                 libbabeltrace: [ OFF ]
        <SNIP>
        [acme@ssdandy linux]$ find tools/perf -name ".make-*.output" | grep lib | tail -5
        tools/perf/config/feature-checks/.make-libdw-dwarf-unwind.output
        tools/perf/config/feature-checks/.make-libbabeltrace.output
        tools/perf/config/feature-checks/.make-zlib.output
        tools/perf/config/feature-checks/.make-liberty.output
        tools/perf/config/feature-checks/.make-liberty-z.output
        [acme@ssdandy linux]$
        [acme@ssdandy linux]$ cat tools/perf/config/feature-checks/.make-libbabeltrace.output
        make[1]: Entering directory `/home/acme/git/linux/tools/perf/config/feature-checks'
        gcc -MD  -Wall -Werror -o test-libbabeltrace.bin test-libbabeltrace.c -Wl,-z,noexecstack  -lbabeltrace-ctf # -lbabeltrace provided by
        test-libbabeltrace.c:2:42: fatal error: babeltrace/ctf-writer/writer.h: No such file or directory
          #include <babeltrace/ctf-writer/writer.h>
                                                ^
        compilation terminated.
        make[1]: *** [test-libbabeltrace.bin] Error 1
        make[1]: Leaving directory `/home/acme/git/linux/tools/perf/config/feature-checks'
        [acme@ssdandy linux]$
      
      So the libbabeltrace feature will not be builtin, but if we do what is required for it
      to be built, namely point where we have it installed:
      
        [acme@ssdandy linux]$ time make -C tools/perf LIBBABELTRACE_DIR=/opt/libbabeltrace install-bin
        make: Entering directory `/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j8' parallel build
        config/Makefile:425: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libunwind: [ OFF ]
        ...            libdw-dwarf-unwind: [ on  ]
        ...                 libbabeltrace: [ on  ]
        ...                          zlib: [ on  ]
        ...     DWARF post unwind library: libdw
        <SNIP>
        [acme@ssdandy linux]$ find tools/perf -name ".make-libbabel*.output" | grep lib | tail -5
        tools/perf/config/feature-checks/.make-libbabeltrace.output
        [acme@ssdandy linux]$ cat tools/perf/config/feature-checks/.make-libbabeltrace.output
        make[1]: Entering directory `/home/acme/git/linux/tools/perf/config/feature-checks'
        gcc -MD -I/opt/libbabeltrace/include -Wall -Werror -o test-libbabeltrace.bin test-libbabeltrace.c -Wl,-z,noexecstack -L/opt/libbabeltrace/lib -lbabeltrace-ctf # -lbabeltrace provided by
        make[1]: Leaving directory `/home/acme/git/linux/tools/perf/config/feature-checks'
        [acme@ssdandy linux]$
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jeremie Galarneau <jgalar@efficios.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-h53xwueqwdeeiqcv9f50nqqb@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      443a7054
    • J
      perf build: Fix libbabeltrace detection · 19a9df35
      Jiri Olsa 提交于
      Following patch added -Werror for feature builds:
      
        b49f1a4b perf tools: Improve feature test debuggability
      
      and exposed a problem in the libbabeltrace feature build, because it was
      including wrong header and gcc couldn't find the used symbol definition.
      
      Adding proper header and keeping the old one as it is needed also
      (libbabeltrace quirk).
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jeremie Galarneau <jgalar@efficios.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/20150310120035.GA4333@krava.redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      19a9df35
    • N
      perf probe: Allow weak symbols to be probed · e578da3b
      Namhyung Kim 提交于
      It currently prevents adding probes in weak symbols.  But there're cases
      that given name is an only weak symbol so that we cannot add probe.
      
        $ perf probe -x /usr/lib/libc.so.6 -a calloc
        Failed to find symbol calloc in /usr/lib/libc-2.21.so
          Error: Failed to add events.
      
        $ nm /usr/lib/libc.so.6 | grep calloc
        000000000007b1f0 t __calloc
        000000000007b1f0 T __libc_calloc
        000000000007b1f0 W calloc
      
      This change will result in duplicate probes when strong and weak symbols
      co-exist in a binary.  But I think it's not a big problem since probes
      at the weak symbol will never be hit anyway.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150306073129.6904.41078.stgit@localhost.localdomainSigned-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e578da3b
    • N
      perf symbols: Allow symbol alias when loading map for symbol name · 680d926a
      Namhyung Kim 提交于
      When perf probe tries to add a probe in a binary using symbol name, it
      sometimes failed since some symbols were discard during loading dso.
      
      When it resolves an address to symbol, it'd be better to have just one
      symbol at given address.  But for finding address from symbol, it'd be
      better to keep all names (including aliases).
      
      So allow tools to state that they want to allow aliases via
      symbol_conf.allow_aliases.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150306073127.6904.3232.stgit@localhost.localdomain
      [ Original patch passwd allow_alias to many functions, use symbol_conf.allow_aliases instead ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      680d926a
    • M
      Revert "perf probe: Fix to fall back to find probe point in symbols" · 0687eba7
      Masami Hiramatsu 提交于
      This reverts commit 906451b9 ("perf probe: Fix to fall back to find probe point in symbols").
      
      Since 'perf probe' now retries with the address of given symbol searched from
      map before this path, this fall back routine isn't needed anymore.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150306073124.6904.1751.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0687eba7
    • M
      perf probe: Fix --line to handle aliased symbols in glibc · 811dd2ae
      Masami Hiramatsu 提交于
      Fix perf probe --line to handle aliased symbols correctly in glibc.
      
      This makes line_range search failing back to address-based alternative
      search as same as --add and --vars.
      
      Without this patch;
        -----
        # ./perf probe -x /usr/lib64/libc-2.17.so -L malloc
        Specified source line is not found.
          Error: Failed to show lines.
        -----
      
      With this patch;
        -----
        # ./perf probe -x /usr/lib64/libc-2.17.so -L malloc
        <__libc_malloc@/usr/src/debug/glibc-2.17-c758a686/malloc/malloc.c:0>
              0  __libc_malloc(size_t bytes)
              1  {
                   mstate ar_ptr;
                   void *victim;
      
                   __malloc_ptr_t (*hook) (size_t, const __malloc_ptr_t)
              6      = force_reg (__malloc_hook);
              7    if (__builtin_expect (hook != NULL, 0))
              8      return (*hook)(bytes, RETURN_ADDRESS (0));
      
             10    arena_lookup(ar_ptr);
      
             12    arena_lock(ar_ptr, bytes);
        -----
      
      Note that this actually shows __libc_malloc, since it is the real
      instance of malloc. User can use both __libc_malloc and malloc for
      --line.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150306073122.6904.18540.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      811dd2ae
    • M
      perf probe: Fix to handle aliased symbols in glibc · 9b118aca
      Masami Hiramatsu 提交于
      Fix perf probe to handle aliased symbols correctly in glibc.  In the
      glibc, several symbols are defined as an alias of __libc_XXX, e.g.
      malloc is an alias of __libc_malloc.
      
      In such cases, dwarf has no subroutine instances of the alias functions
      (e.g. no "malloc" instance), but the map has that symbol and its
      address.
      
      Thus, if we search the alieased symbol in debuginfo, we always fail to
      find it, but it is in the map.
      
      To solve this problem, this fails back to address-based alternative
      search, which searches the symbol in the map, translates its address to
      alternative (correct) function name by using debuginfo, and retry to
      find the alternative function point from debuginfo.
      
      This adds fail-back process to --vars, --lines and --add options. So,
      now you can use those on malloc@libc :)
      
      Without this patch;
        -----
        # ./perf probe -x /usr/lib64/libc-2.17.so -V malloc
        Failed to find the address of malloc
          Error: Failed to show vars.
        # ./perf probe -x /usr/lib64/libc-2.17.so -a "malloc bytes"
        Probe point 'malloc' not found in debuginfo.
          Error: Failed to add events.
        -----
      
      With this patch;
        -----
        # ./perf probe -x /usr/lib64/libc-2.17.so -V malloc
        Available variables at malloc
                @<__libc_malloc+0>
                        size_t  bytes
        # ./perf probe -x /usr/lib64/libc-2.17.so -a "malloc bytes"
        Added new event:
          probe_libc:malloc    (on malloc in /usr/lib64/libc-2.17.so with bytes)
      
        You can now use it in all perf tools, such as:
      
                perf record -e probe_libc:malloc -aR sleep 1
        -----
      Reported-by: NArnaldo Carvalho de Melo <acme@kernel.org>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naohiro Aota <naota@elisp.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150306073120.6904.13779.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9b118aca
    • A
      perf ordered_events: Adopt queue() method · 4a6b362f
      Arnaldo Carvalho de Melo 提交于
      From perf_session, will be used in 'trace'.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-mfihndzaumx44h6y37ng2irb@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4a6b362f
    • J
      perf tools: Remove superfluous thread->comm_set setting · 01fbc1fe
      Jiri Olsa 提交于
      It is set by calling thread__set_comm right before the removed line.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1425396581-17716-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      01fbc1fe
    • A
      perf tools: tool->finished_round() doesn't need perf_session · d704ebda
      Arnaldo Carvalho de Melo 提交于
      It is all about flushing the ordered queue or piping it thru, no need
      for a perf_session pointer.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-g47fx3ys0t9271cp0dcabjc7@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d704ebda
    • A
      perf ordered_events: Allow tools to specify a deliver method · d10eb1eb
      Arnaldo Carvalho de Melo 提交于
      So that we can simplify the deliver method to pass just:
      
       (ordered_events, ordered_event, sample);
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-j0s4bpxs5qza5tnkvjwom9rw@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d10eb1eb
  3. 11 3月, 2015 2 次提交
  4. 03 3月, 2015 2 次提交
    • A
      perf sched: No need to keep the session around · ae536acf
      Arnaldo Carvalho de Melo 提交于
      We were keeping the session around just because we kept pointers to
      struct thread instances, but now we reference count them, so no need
      for deferring the perf_session__delete call to after we traverse the
      work_list entries.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-9agtck6jdr3rebdp39z1lo0e@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ae536acf
    • A
      perf tools: Reference count struct thread · f3b623b8
      Arnaldo Carvalho de Melo 提交于
      We need to do that to stop accumulating entries in the dead_threads
      linked list, i.e. we were keeping references to threads in struct hists
      that continue to exist even after a thread exited and was removed from
      the machine threads rbtree.
      
      We still keep the dead_threads list, but just for debugging, allowing us
      to iterate at any given point over the threads that still are referenced
      by things like struct hist_entry.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3ejvfyed0r7ue61dkurzjux4@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f3b623b8
  5. 02 3月, 2015 17 次提交
  6. 28 2月, 2015 1 次提交
    • H
      perf report: Fix branch stack mode cannot be set · fefd2d96
      He Kuang 提交于
      When perf.data file is obtained using 'perf record -b', perf report
      should use branch stack mode to generate output. But this function is
      broken by improper comparison between boolean and constant -1.
      
      before this patch:
      
        $ perf report -b -i perf.data
        Samples: 16  of event 'cycles', Event count (approx.): 3171896
        Overhead  Command  Shared Object      Symbol
          13.59%  ls       [kernel.kallsyms]  [k] prio_tree_remove
          13.16%  ls       [kernel.kallsyms]  [k] change_pte_range
          12.09%  ls       [kernel.kallsyms]  [k] page_fault
          12.02%  ls       [kernel.kallsyms]  [k] zap_pte_range
        ...
      
      after this patch:
      
        $ perf report -b -i perf.data
        Samples: 256  of event 'cycles', Event count (approx.): 256
        Overhead  Command  Source Shared Object  Source Symbol                               Target Shared Object  Target Symbol
           9.38%  ls       [unknown]             [k] 0000000000000000                        [unknown]             [k] 0000000000000000
           6.25%  ls       libc-2.19.so          [.] _dl_addr                                libc-2.19.so          [.] _dl_addr
           6.25%  ls       [kernel.kallsyms]     [k] zap_pte_range                           [kernel.kallsyms]     [k] zap_pte_range
           6.25%  ls       [kernel.kallsyms]     [k] change_pte_range                        [kernel.kallsyms]     [k] change_pte_range
           0.39%  ls       [kernel.kallsyms]     [k] prio_tree_remove                        [kernel.kallsyms]     [k] prio_tree_remove
        ...
      Signed-off-by: NHe Kuang <hekuang@huawei.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1423967617-28879-1-git-send-email-hekuang@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fefd2d96