1. 25 5月, 2012 2 次提交
  2. 24 5月, 2012 1 次提交
  3. 23 5月, 2012 3 次提交
    • A
      perf evlist: Show event attribute details · 26252ea6
      Arnaldo Carvalho de Melo 提交于
      There was no easy way to see the frequency used, and with the change of
      default, we better provide one.
      
      [root@sandy linux]# perf evlist -F
      cycles: sample_freq=4000
      [root@sandy linux]# perf evlist -v
      cycles: sample_freq=4000, size: 80, sample_type: 391, read_format: 7, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, sample_id_all: 1, exclude_guest: 1
      [root@sandy linux]#
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-e1p9poez3nwrgycbmwqmhlsu@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      26252ea6
    • A
      perf tools: Bump default sample freq to 4 kHz · 447a6013
      Arnaldo Carvalho de Melo 提交于
      Quoting Ingo:
      
      "While at it I'd also suggest increasing the default sampling frequency,
      from 1000 Hz per CPU to at least 4Khz auto-freq or so - this should work
      well all across the board I think. CPUs are getting faster and command/app
      run times are getting shorter, 1Khz is a bit low IMO."
      Requested-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-2jafa6mkrufyekny9ei59lpu@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      447a6013
    • S
      perf buildid-list: Work better with pipe mode · 299c3452
      Stephane Eranian 提交于
      In order for perf buildid-list to work with pipe-mode files, it needs to
      process buildids and event attr structs.
      
      $ perf record -o - noploop 2 | ./perf inject -b | perf buildid-list -i - -H
      noploop for 2 seconds
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.084 MB - (~3678 samples) ]
      0000000000000000000000000000000000000000 [kernel.kallsyms]
      3a0d0629efe74a8da3eeba372cdbd74ad9b8f5d5 /usr/local/bin/noploop
      
      The reason [kernel.kallsyms] shows a 0 build-id comes from the
      way buildids are injected in the stream.
      
      The buildid for the kernel is provided by a BUILD_ID record. The
      [kernel.kallsyms] is provided by a MMAP record. There is no clean and
      obvious way to link the two, unfortunately.
      
      In regular mode, the kernel buildid is generated from reading the ELF
      image or kallsyms and perf knows to associate [kernel.kallsyms] to it.
      Later on, when perf processes the [kernel.kallsyms] MMAP record, it will
      already have a dso for it.
      
      So for now, make sure perf buildid-list shows the buildids for
      everything but the kernel image.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1337081295-10303-6-git-send-email-eranian@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      299c3452
  4. 22 5月, 2012 16 次提交
  5. 19 5月, 2012 1 次提交
    • D
      perf evsel: Create events initially disabled -- again · 5e1c81d9
      David Ahern 提交于
      764e16a3 changed perf-record to create events disabled by default and
      enable them once perf initializations are done. This setting was dropped
      by 0f82ebc4. Now perf events are once again generated during perf's
      initialization phase (e.g., generating maps).
      
      As an example, perf opens a lot of files at startup. Unpatched:
      
      perf record -e syscalls:sys_enter_open -ga -fo /tmp/perf.data -- sleep 1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.087 MB /tmp/perf.data (~3798 samples) ]
      
      Using perf-script to look at the samples shows the perf command generating
      563 of the 566 total events.
      
      Patched:
      
      perf record -e syscalls:sys_enter_open -ga -fo /tmp/perf.data -- sleep 1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.028 MB /tmp/perf.data (~1206 samples) ]
      
      Using perf-script to look at the samples does not show perf command.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1336968088-11531-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5e1c81d9
  6. 18 5月, 2012 2 次提交
    • J
      perf tools: Split term type into value type and term type · 16fa7e82
      Jiri Olsa 提交于
      Introducing type_val and type_term for term instead of a single type
      value. Currently the term type marked out the value type as well.
      
      With this change we can have future string term values being specified
      by user and translated into proper number along the processing.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1335371102-11358-2-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      16fa7e82
    • J
      perf hists: Fix callchain ip printf format · a0187060
      Jiri Olsa 提交于
      The callchain address is stored as u64. Current code uses following
      format string to display callchain address:
      
        "%p\n", (void *)(long)chain->ip
      
      This way we lose upper 32 bits if we report 64 bit addresses in 32 bit
      environment. Fixing this to always display whole 64 bits.
      
      Note, running following to test perf endianity handling:
      test 1)
        - origin system:
          # perf record -a -- sleep 10 (any perf record will do)
          # perf report > report.origin
          # perf archive perf.data
      
        - copy the perf.data, report.origin and perf.data.tar.bz2
          to a target system and run:
          # tar xjvf perf.data.tar.bz2 -C ~/.debug
          # perf report > report.target
          # diff -u report.origin report.target
      
        - the diff should produce no output
          (besides some white space stuff and possibly different
           date/TZ output)
      
      test 2)
        - origin system:
          # perf record -ag -fo /tmp/perf.data -- sleep 1
        - mount origin system root to the target system on /mnt/origin
        - target system:
          # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
           --kallsyms /mnt/origin/proc/kallsyms
        - complete perf.data header is displayed
      Signed-off-by: NJiri Olsa <jolsa@redhat.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@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1337151548-2396-8-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a0187060
  7. 17 5月, 2012 1 次提交
  8. 16 5月, 2012 2 次提交
  9. 13 5月, 2012 5 次提交
  10. 12 5月, 2012 2 次提交
  11. 11 5月, 2012 2 次提交
  12. 10 5月, 2012 1 次提交
    • D
      perf stat: handle ENXIO error for perf_event_open · 20d23aaa
      David Ahern 提交于
      perf stat on PPC currently fails to run:
      
      $ perf stat -- sleep 1
        Error: open_counter returned with 6 (No such device or address). /bin/dmesg may provide additional information.
      
        Fatal: Not all events could be opened.
      
      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 stat -v -- sleep 1
      cycles event is not supported by the kernel.
      stalled-cycles-frontend event is not supported by the kernel.
      stalled-cycles-backend event is not supported by the kernel.
      instructions event is not supported by the kernel.
      branches event is not supported by the kernel.
      branch-misses event is not supported by the kernel.
      
      ...
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1336490956-57145-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      20d23aaa
  13. 09 5月, 2012 2 次提交