1. 12 Mar, 2015 9 commits
  2. 11 Mar, 2015 2 commits
  3. 03 Mar, 2015 3 commits
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 94ac003b
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
        - Warn if given uprobe event accesses memory on older kernel (Masami Hiramatsu)
      
        - 'perf record' Documentation fixes (Namhyung Kim)
      
        - Report unsupported events properly in 'perf stat' (Suzuki K. Poulose)
      
      Infrastructure changes:
      
        - Avoid FORK after COMM when synthesizing records for pre-existing threads (Arnaldo Carvalho de Melo)
      
        - Reference count struct thread (Arnaldo Carvalho de Melo)
      
        - Don't keep the session around in 'perf sched', thread refcounting removes that need (Arnaldo Carvalho de Melo)
      
        - Initialize cpu set in pthread_attr_setaffinity_np() feature test (Adrian Hunter)
      
        - Only include tsc file for x86 (David Ahern)
      
        - Compare JOBS to 0 after grep (David Ahern)
      
        - Improve feature detection messages (Ingo Molnar)
      
        - Revert "perf: Remove the extra validity check on nr_pages" (Kan Liang)
      
        - Remove bias offset to find probe point by address (Masami Hiramatsu)
      
        - Fix build error on ARCH=i386/x86_64/sparc64 (Namhyung Kim)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      94ac003b
    • Arnaldo Carvalho de Melo's avatar
      perf sched: No need to keep the session around · ae536acf
      Arnaldo Carvalho de Melo authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae536acf
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Reference count struct thread · f3b623b8
      Arnaldo Carvalho de Melo authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f3b623b8
  4. 02 Mar, 2015 19 commits
  5. 01 Mar, 2015 1 commit
  6. 28 Feb, 2015 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 788b94ba
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
        - Fix SIGBUS failures due to misaligned accesses in Sparc64 (David Ahern)
      
        - Fix branch stack mode in 'perf report' (He Kuang)
      
        - Fix a 'perf probe' operator precedence bug (He Kuang)
      
        - Fix Support for different binaries with same name in 'perf diff' (Kan Liang)
      
        - Check kprobes blacklist when adding new events via 'perf probe' (Masami Hiramatsu)
      
        - Add --purge FILE to remove all caches of FILE in 'perf buildid-cache' (Masami Hiramatsu)
      
        - Show usage with some incorrect params (Masami Hiramatsu)
      
        - Add new buildid cache if update target is not cached in 'buildid-cache' (Masami Hiramatsu)
      
        - Allow listing events with 'tracepoint' prefix in 'perf list' (Yunlong Song)
      
        - Sort the output of 'perf list' (Yunlong Song)
      
        - Fix bash completion of 'perf --' (Yunlong Song)
      
      Developer Zone:
      
        - Handle strdup() failure path in 'perf probe' (Arnaldo Carvalho de Melo)
      
        - Fix get_real_path to free allocated memory in error path in 'perf probe' (Masami Hiramatsu)
      
        - Use pr_debug instead of verbose && pr_info perf buildid-cache (Masami Hiramatsu)
      
        - Fix building of 'perf data' with some gcc versions due to incorrect array struct
          entry (Yunlong Song)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      788b94ba
  7. 27 Feb, 2015 5 commits
    • He Kuang's avatar
      perf report: Fix branch stack mode cannot be set · fefd2d96
      He Kuang authored
      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: default avatarHe Kuang <hekuang@huawei.com>
      Tested-by: default avatarArnaldo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fefd2d96
    • Masami Hiramatsu's avatar
      perf buildid-cache: Show usage with incorrect params · 0497d0a8
      Masami Hiramatsu authored
      Show usage if no action is specified or unexpected parameter is given.
      In other words, be more user friendly.
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.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>
      Link: http://lkml.kernel.org/r/20150227045030.1999.44006.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0497d0a8
    • Masami Hiramatsu's avatar
      perf buildid-cache: Use pr_debug instead of verbose && pr_info · cc169c7c
      Masami Hiramatsu authored
      Use pr_debug instead of the combination of verbose and pr_info.
      
      "if (verbose) pr_info(...)" is same as "pr_debug(...)", replace it.
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Suggested-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20150227045028.1999.93137.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cc169c7c
    • Masami Hiramatsu's avatar
      perf buildid-cache: Add --purge FILE to remove all caches of FILE · 8d8c8e4c
      Masami Hiramatsu authored
      Add --purge FILE to remove all caches of FILE.
      
      Since the current --remove FILE removes a cache which has
      same build-id of given FILE. Since the command takes a
      FILE path, it can confuse user who tries to remove cache
      about FILE path.
      
        -----
        # ./perf buildid-cache -v --add ./perf
        Adding 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok
        # (update the ./perf binary)
        # ./perf buildid-cache -v --remove ./perf
        Removing 305bbd1be68f66eca7e2d78db294653031edfa79 ./perf: FAIL
        ./perf wasn't in the cache
        -----
      Actually, the --remove's FAIL is not shown, it just silently fails.
      
      So, this patch adds --purge FILE action for such usecase.
      
      perf buildid-cache --purge FILE removes all caches which has same FILE
      path.
      
      In other words, it removes all caches including old binaries.
      
        -----
        # ./perf buildid-cache -v --add ./perf
        Adding 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok
        # (update the ./perf binary)
        # ./perf buildid-cache -v --purge ./perf
        Removing 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok
        -----
      
      BTW, if you want to purge all the caches, remove ~/.debug/* .
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Hemant Kumar <hemant@linux.vnet.ibm.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>
      Link: http://lkml.kernel.org/r/20150227045026.1999.64084.stgit@localhost.localdomain
      [ s/dirname/dir_name/g to fix build on fedora14, where dirname is a global ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8d8c8e4c
    • Yunlong Song's avatar
      perf tools: Fix the bash completion problem of 'perf --*' · 7335399a
      Yunlong Song authored
      The perf-completion.sh uses a predefined string '--help --version
      --exec-path --html-path --paginate --no-pager --perf-dir --work-tree
      --debugfs-dir' for the bash completion of 'perf --*', which has two
      problems:
      
       Problem 1: If the options of perf are changed (see handle_options() in
       perf.c), the perf-completion.sh has to be changed at the same time. If
       not, the bash completion of 'perf --*' and the options which perf
       really supports will be inconsistent.
      
       Problem 2: When typing another single character after 'perf --', e.g.
       'h', and hit TAB key to get the bash completion of 'perf --h', the
       character 'h' disappears at once. This is not what we want, we wish the
       bash completion can return '--help --html-path' and then we can
       continue to choose one.
      
       To solve this problem, we add '--list-opts' to perf, which now supports
       'perf --list-opts' directly, and its result can be used in bash
       completion now.
      
      Example:
      
       Before this patch:
      
       $ perf --h                 <-- hit TAB key after character 'h'
       $ perf --                  <-- 'h' disappears and no required result
      
       After this patch:
      
       $ perf --h                 <-- hit TAB key after character 'h'
       --help       --html-path   <-- the required result
      Signed-off-by: default avatarYunlong Song <yunlong.song@huawei.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ingo Molnar <mingo@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/1425032491-20224-8-git-send-email-yunlong.song@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7335399a