1. 24 8月, 2016 1 次提交
  2. 19 7月, 2016 1 次提交
  3. 05 7月, 2016 1 次提交
  4. 14 6月, 2016 1 次提交
  5. 17 5月, 2016 1 次提交
    • A
      perf tools: Separate accounting of contexts and real addresses in a stack trace · a29d5c9b
      Arnaldo Carvalho de Melo 提交于
      The perf_sample->ip_callchain->nr value includes all the entries in the
      ip_callchain->ip[] array, real addresses and PERF_CONTEXT_{KERNEL,USER,etc},
      while what the user expects is that what is in the kernel.perf_event_max_stack
      sysctl or in the upcoming per event perf_event_attr.sample_max_stack knob be
      honoured in terms of IP addresses in the stack trace.
      
      So match the kernel support and validate chain->nr taking into account
      both kernel.perf_event_max_stack and kernel.perf_event_max_contexts_per_stack.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Link: http://lkml.kernel.org/n/tip-mgx0jpzfdq4uq4abfa40byu0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a29d5c9b
  6. 12 5月, 2016 1 次提交
  7. 10 5月, 2016 1 次提交
  8. 27 4月, 2016 2 次提交
  9. 24 2月, 2016 1 次提交
  10. 17 2月, 2016 1 次提交
  11. 30 1月, 2016 1 次提交
  12. 26 1月, 2016 1 次提交
  13. 12 1月, 2016 1 次提交
  14. 09 1月, 2016 1 次提交
    • N
      perf report: Show random usage tip on the help line · 14cbfbeb
      Namhyung Kim 提交于
      Currently perf report only shows a help message "For a higher level
      overview, try: perf report --sort comm,dso" unconditionally (even if
      the sort keys were used).  Add more help tips and show randomly.
      
      Load tips from ${prefix}/share/doc/perf-tip/tips.txt file.
      
        $ perf report | tail
            0.10%  swapper  [kernel.vmlinux]   [k] irq_exit
            0.09%  swapper  [kernel.vmlinux]   [k] flush_smp_call_function_queue
            0.08%  swapper  [kernel.vmlinux]   [k] native_write_msr_safe
            0.03%  swapper  [kernel.vmlinux]   [k] group_sched_in
            0.01%  perf     [kernel.vmlinux]   [k] native_write_msr_safe
      
        #
        # (Tip: Search options using a keyword: perf report -h <keyword>)
        #
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1452166913-27046-1-git-send-email-namhyung@kernel.org
      [ Renamed it to perf_tip() and the parameter dirname to dirpath to fix the build on older distros ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      14cbfbeb
  15. 14 12月, 2015 1 次提交
  16. 10 12月, 2015 1 次提交
  17. 20 11月, 2015 1 次提交
    • N
      perf report: Add callchain value option · f2af0086
      Namhyung Kim 提交于
      Now -g/--call-graph option supports how to display callchain values.
      Possible values are 'percent', 'period' and 'count'.  The percent is
      same as before and it's the default behavior.  The period displays the
      raw period value rather than the percentage.  The count displays the
      number of occurrences.
      
        $ perf report --no-children --stdio -g percent
        ...
          39.93%  swapper  [kernel.vmlinux]  [k] intel_idel
                  |
                  ---intel_idle
                     cpuidle_enter_state
                     cpuidle_enter
                     call_cpuidle
                     cpu_startup_entry
                     |
                     |--28.63%-- start_secondary
                     |
                      --11.30%-- rest_init
      
        $ perf report --no-children --show-total-period --stdio -g period
        ...
          39.93%   13018705  swapper  [kernel.vmlinux]  [k] intel_idel
                  |
                  ---intel_idle
                     cpuidle_enter_state
                     cpuidle_enter
                     call_cpuidle
                     cpu_startup_entry
                     |
                     |--9334403-- start_secondary
                     |
                      --3684302-- rest_init
      
        $ perf report --no-children --show-nr-samples --stdio -g count
        ...
          39.93%     80  swapper  [kernel.vmlinux]  [k] intel_idel
                  |
                  ---intel_idle
                     cpuidle_enter_state
                     cpuidle_enter
                     call_cpuidle
                     cpu_startup_entry
                     |
                     |--57-- start_secondary
                     |
                      --23-- rest_init
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NBrendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1447047946-1691-6-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f2af0086
  18. 07 11月, 2015 1 次提交
  19. 23 10月, 2015 1 次提交
  20. 06 10月, 2015 1 次提交
  21. 18 9月, 2015 1 次提交
  22. 04 9月, 2015 1 次提交
  23. 03 9月, 2015 2 次提交
  24. 29 8月, 2015 2 次提交
  25. 09 8月, 2015 1 次提交
  26. 10 6月, 2015 1 次提交
    • M
      perf tools: Avoid possible race condition in copyfile() · d7c72606
      Milos Vyletel 提交于
      Use unique temporary files when copying to buildid dir to prevent races
      in case multiple instances are trying to copy same file. This is done by
      
      - creating template in form <path>/.<filename>.XXXXXX where the suffix is
        used by mkstemp() to create unique file
      - change file mode
      - copy content
      - if successful link temp file to target file
      - unlink temp file
      
      At this point the only file left at target path should be the desired
      one either created by us or other instance if we raced. This should also
      prevent not yet fully copied files to be visible to to other perf
      instances that could try to parse them.
      
      On top of that slow_copyfile no longer needs to deal with file mode when
      creating file since temporary file is already created and mode is set.
      
      Succesfully tested by myself by running perf record, archive and reading
      the data on other system and by running perf buildid-cache on perf
      binary itself. I also did revert fix from 0635b0f7 that to exposes
      previously fixed race with EEXIST and recreator test passed sucessfully.
      Signed-off-by: NMilos Vyletel <milos@redhat.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1433775018-19868-1-git-send-email-milos@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d7c72606
  27. 18 5月, 2015 2 次提交
  28. 25 2月, 2015 1 次提交
  29. 11 2月, 2015 1 次提交
  30. 12 12月, 2014 2 次提交
  31. 03 10月, 2014 1 次提交
    • J
      perf callchain: Move callchain_param to util object in to fix python test · 23aadb1f
      Jiri Olsa 提交于
      In following commit we changed the location of callchains data:
      
        72a128aa
        perf tools: Move callchain config from record_opts to callchain_param
      
      Now all callchains stuff stays in callchain_param struct, which adds its
      dependency for evsel.c object and breaks python perf.so usage
      (unresolved callchain_param).
      
      Moving callchain_param into callchain.c and adding it into
      python-ext-sources unleash just another dependency hell, so I ended up
      adding callchain_param into util.c for now.
      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: Ingo Molnar <mingo@kernel.org>
      Cc: Milian Wolff <mail@milianw.de>
      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/1412179229-19466-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      23aadb1f
  32. 15 8月, 2014 1 次提交
  33. 13 8月, 2014 1 次提交
  34. 12 8月, 2014 1 次提交
    • J
      perf tools: Show better error message in case we fail to open counters due to EBUSY error · 63914aca
      Jiri Olsa 提交于
      Showing better error message in case we fail to open counters due to the
      EBUSY error. If we detect oprofile daemon process running, we now
      display following message for EBUSY error:
      
        $ perf record ls
        Error:
        The PMU counters are busy/taken by another profiler.
        We found oprofile daemon running, please stop it and try again.
      
      In case oprofiled was not detected the current error message stays:
      
        $ perf record ls
        Error:
        The sys_perf_event_open() syscall returned with 16 (Device or resource busy) for event (cycles).
        /bin/dmesg may provide additional information.
        No CONFIG_PERF_EVENTS=y kernel support configured?
      
      Also changing PERF_FLAG_FD_CLOEXEC detection code not to display error
      in case of EBUSY error, as it currently does:
      
        $ perf record ls
        Error:
        perf_event_open(..., PERF_FLAG_FD_CLOEXEC) failed with unexpected error 16 (Device or resource busy)
        perf_event_open(..., 0) failed unexpectedly with error 16 (Device or resource busy)
        The PMU counters are busy/taken by another profiler.
        We found oprofile daemon running, please stop it and try again.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: William Cohen <wcohen@redhat.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Link: http://lkml.kernel.org/r/1406908014-8312-1-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      63914aca
  35. 17 7月, 2014 1 次提交