1. 09 5月, 2012 1 次提交
    • D
      perf record: Fix fallback to cpu-clock on ppc · 028d455b
      David Ahern 提交于
      perf-record on PPC is not falling back to cpu-clock:
      
      $ perf record -ag -fo /tmp/perf.data -- sleep 1
      
        Error: sys_perf_event_open() syscall returned with 6 (No such device or address).  /bin/dmesg may provide additional information.
      
        Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
      
      The problem is that until 2.6.37 (behavior changed with commit b0a873eb)
      perf on PPC returns ENXIO when hw_perf_event_init() fails. With this
      patch we get the expected behavior:
      
      $ perf record -ag -fo /tmp/perf.data -v -- sleep 1
      Old kernel, cannot exclude guest or host samples.
      The cycles event is not supported, trying to fall back to cpu-clock-ticks
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.151 MB /tmp/perf.data (~6592 samples) ]
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1336490937-57106-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      028d455b
  2. 08 5月, 2012 3 次提交
  3. 03 5月, 2012 3 次提交
  4. 12 4月, 2012 1 次提交
  5. 09 3月, 2012 3 次提交
  6. 03 3月, 2012 2 次提交
  7. 15 2月, 2012 2 次提交
  8. 14 2月, 2012 1 次提交
  9. 09 2月, 2012 1 次提交
  10. 03 2月, 2012 1 次提交
  11. 25 1月, 2012 1 次提交
  12. 24 12月, 2011 3 次提交
  13. 20 12月, 2011 1 次提交
    • A
      perf record: Add ability to record event period · 3e76ac78
      Andrew Vagin 提交于
      The problem is that when SAMPLE_PERIOD is not set, the kernel generates
      a number of samples in proportion to an event's period. Number of these
      samples may be too big and the kernel throttles all samples above a
      defined limit.
      
      E.g.: I want to trace when a process sleeps. I created a process which
      sleeps for 1ms and for 4ms.  perf got 100 events in both cases.
      
      swapper 0 [000] 1141.371830: sched_stat_sleep: comm=foo pid=1801 delay=1386750 [ns]
      swapper 0 [000] 1141.369444: sched_stat_sleep: comm=foo pid=1801 delay=4499585 [ns]
      
      In the first case a kernel want to send 4499585 events and in the second
      case it wants to send 1386750 events.  perf-reports shows that process
      sleeps in both places equal time.
      
      Instead of this we can get only one sample with an attribute period. As
      result we have less data transferring between kernel and user-space and
      we avoid throttling of samples.
      
      The patch "events: Don't divide events if it has field period" added a
      kernel part of this functionality.
      Acked-by: NArun Sharma <asharma@fb.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: devel@openvz.org
      Link: http://lkml.kernel.org/r/1324391565-1369947-1-git-send-email-avagin@openvz.orgSigned-off-by: NAndrew Vagin <avagin@openvz.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3e76ac78
  14. 29 11月, 2011 1 次提交
  15. 28 11月, 2011 8 次提交
  16. 26 10月, 2011 2 次提交
  17. 08 10月, 2011 1 次提交
    • S
      perf tools: Make perf.data more self-descriptive (v8) · fbe96f29
      Stephane Eranian 提交于
      The goal of this patch is to include more information about the host
      environment into the perf.data so it is more self-descriptive. Overtime,
      profiles are captured on various machines and it becomes hard to track
      what was recorded, on what machine and when.
      
      This patch provides a way to solve this by extending the perf.data file
      with basic information about the host machine. To add those extensions,
      we leverage the feature bits capabilities of the perf.data format.  The
      change is backward compatible with existing perf.data files.
      
      We define the following useful new extensions:
       - HEADER_HOSTNAME: the hostname
       - HEADER_OSRELEASE: the kernel release number
       - HEADER_ARCH: the hw architecture
       - HEADER_CPUDESC: generic CPU description
       - HEADER_NRCPUS: number of online/avail cpus
       - HEADER_CMDLINE: perf command line
       - HEADER_VERSION: perf version
       - HEADER_TOPOLOGY: cpu topology
       - HEADER_EVENT_DESC: full event description (attrs)
       - HEADER_CPUID: easy-to-parse low level CPU identication
      
      The small granularity for the entries is to make it easier to extend
      without breaking backward compatiblity. Many entries are provided as
      ASCII strings.
      
      Perf report/script have been modified to print the basic information as
      easy-to-parse ASCII strings. Extended information about CPU and NUMA
      topology may be requested with the -I option.
      
      Thanks to David Ahern for reviewing and testing the many versions of
      this patch.
      
       $ perf report --stdio
       # ========
       # captured on : Mon Sep 26 15:22:14 2011
       # hostname : quad
       # os release : 3.1.0-rc4-tip
       # perf version : 3.1.0-rc4
       # arch : x86_64
       # nrcpus online : 4
       # nrcpus avail : 4
       # cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
       # cpuid : GenuineIntel,6,15,11
       # total memory : 8105360 kB
       # cmdline : /home/eranian/perfmon/official/tip/build/tools/perf/perf record date
       # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, id = { 29, 30, 31,
       # HEADER_CPU_TOPOLOGY info available, use -I to display
       # HEADER_NUMA_TOPOLOGY info available, use -I to display
       # ========
       #
       ...
      
       $ perf report --stdio -I
       # ========
       # captured on : Mon Sep 26 15:22:14 2011
       # hostname : quad
       # os release : 3.1.0-rc4-tip
       # perf version : 3.1.0-rc4
       # arch : x86_64
       # nrcpus online : 4
       # nrcpus avail : 4
       # cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
       # cpuid : GenuineIntel,6,15,11
       # total memory : 8105360 kB
       # cmdline : /home/eranian/perfmon/official/tip/build/tools/perf/perf record date
       # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, id = { 29, 30, 31,
       # sibling cores   : 0-3
       # sibling threads : 0
       # sibling threads : 1
       # sibling threads : 2
       # sibling threads : 3
       # node0 meminfo  : total = 8320608 kB, free = 7571024 kB
       # node0 cpu list : 0-3
       # ========
       #
       ...
      Reviewed-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NDavid Ahern <dsahern@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Link: http://lkml.kernel.org/r/20110930134040.GA5575@quadSigned-off-by: NStephane Eranian <eranian@google.com>
      [ committer notes: Use --show-info in the tools as was in the docs, rename
        perf_header_fprintf_info to perf_file_section__fprintf_info, fixup
        conflict with f69b64f7 "perf: Support setting the disassembler style" ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fbe96f29
  18. 30 9月, 2011 1 次提交
  19. 24 9月, 2011 1 次提交
  20. 18 8月, 2011 1 次提交
  21. 25 7月, 2011 1 次提交
  22. 21 7月, 2011 1 次提交