All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support
@ 2012-10-20 14:33 Jiri Olsa
  2012-10-20 14:33 ` [PATCH 01/11] perf: Add PERF_EVENT_IOC_ID ioctl to return event ID Jiri Olsa
                   ` (13 more replies)
  0 siblings, 14 replies; 42+ messages in thread
From: Jiri Olsa @ 2012-10-20 14:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
	Paul Mackerras, Corey Ashford, Frederic Weisbecker, Namhyung Kim

hi,
adding support to read sample values through the PERF_SAMPLE_READ
sample type. It's now possible to specify 'S' modifier for an event
and get its sample value by PERF_SAMPLE_READ.

For group the 'S' modifier will enable sampling only for the leader
and read all the group member by PERF_SAMPLE_READ smple type with
PERF_FORMAT_GROUP read format.

This patchset is based on group report patches by Namhyung Kim:
http://lwn.net/Articles/518569/

Example:
(making sample on cycles, reading both cycles and cache-misses
 by PERF_SAMPLE_READ/PERF_FORMAT_GROUP)

  # ./perf record -e '{cycles,cache-misses}:S' ls
  ...

  # ./perf report --group --show-total-period --stdio
  # ========
  # captured on: Sat Oct 20 16:53:39 2012
  ...
  # group: {cycles,cache-misses}
  # ========
  #
  # Samples: 86  of event 'anon group { cycles, cache-misses }'
  # Event count (approx.): 34863674
  #
  #         Overhead                    Period  Command      Shared Object                            Symbol
  # ................  ........................  .......  .................  ................................
  #
      16.56%  19.47%       5773450         475       ls  [kernel.kallsyms]  [k] native_sched_clock          
      10.87%   0.74%       3789088          18       ls  [kernel.kallsyms]  [k] rtl8169_interrupt           
       9.82%  15.86%       3423364         387       ls  [kernel.kallsyms]  [k] mark_lock                   
       8.43%  17.75%       2938384         433       ls  ld-2.14.90.so      [.] do_lookup_x                 
       6.79%  20.86%       2365622         509       ls  ls                 [.] calculate_columns           
       6.36%   0.61%       2216808          15       ls  [kernel.kallsyms]  [k] lock_release                
  ...


Attached patches:
  01/11 perf: Add PERF_EVENT_IOC_ID ioctl to return event ID
  02/11 perf: Do not get values from disabled counters in group format read
  03/11 perf tool: Use PERF_EVENT_IOC_ID perf ioctl to read event id
  04/11 perf tool: Add support for parsing PERF_SAMPLE_READ sample type
  05/11 perf tool: Fix event ID retrieval for group format read case
  06/11 perf tool: Add perf_evlist__id2sid function to get event ID related data
  07/11 perf tool: Add PERF_SAMPLE_READ sample related processing
  08/11 perf tool: Add 'S' event/group modifier to read sample value
  09/11 perf test: Add parse events tests for leader sampling
  10/11 perf tool: Display period values for all group members
  11/11 perf record: Fix mmap error output condition


wbr,
jirka

Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
---
 include/linux/perf_event.h             |   1 +
 kernel/events/core.c                   |  27 ++++++++++++++++++---
 tools/perf/Documentation/perf-list.txt |   1 +
 tools/perf/builtin-record.c            |   3 ++-
 tools/perf/ui/hist.c                   |  46 +++++++++++++++++++++++++++++++----
 tools/perf/util/event.h                |  18 ++++++++++++++
 tools/perf/util/evlist.c               |  82 ++++++++++++++++++++++++++++++++++++++++++++++++++------------
 tools/perf/util/evlist.h               |   4 ++++
 tools/perf/util/evsel.c                |  54 +++++++++++++++++++++++++++++++++++++++--
 tools/perf/util/evsel.h                |   4 ++++
 tools/perf/util/parse-events-test.c    | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/parse-events.c         |   6 +++++
 tools/perf/util/parse-events.l         |   2 +-
 tools/perf/util/session.c              | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 14 files changed, 448 insertions(+), 27 deletions(-)

^ permalink raw reply	[flat|nested] 42+ messages in thread
* [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support
@ 2013-02-04 12:32 Jiri Olsa
  2013-02-06  4:59 ` Namhyung Kim
  0 siblings, 1 reply; 42+ messages in thread
From: Jiri Olsa @ 2013-02-04 12:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
	Paul Mackerras, Corey Ashford, Frederic Weisbecker, Namhyung Kim

hi,
adding support to read sample values through the PERF_SAMPLE_READ
sample type. It's now possible to specify 'S' modifier for an event
and get its sample value by PERF_SAMPLE_READ.

For group the 'S' modifier will enable sampling only for the leader
and read all the group member by PERF_SAMPLE_READ smple type with
PERF_FORMAT_GROUP read format.

This was first introduced in here:
https://lkml.org/lkml/2012/10/20/75

Example:

  $ perf record -e '{cycles,cache-misses}:S' ls
  ...
  $ perf report --group --show-total-period --stdio
  ...
  # Samples: 36  of event 'anon group { cycles, cache-misses }'
  # Event count (approx.): 12585593
  #
  #         Overhead                    Period  Command      Shared Object                      Symbol
  # ................  ........................  .......  .................  ..........................
  #
      19.92%   1.20%       2505936          31       ls  [kernel.kallsyms]  [k] mark_held_locks
      13.74%   0.47%       1729327          12       ls  [kernel.kallsyms]  [k] sched_clock_local
      13.64%  23.72%       1716147         612       ls  ld-2.14.90.so      [.] check_match.10805
      13.12%  23.22%       1650778         599       ls  libc-2.14.90.so    [.] _nl_intern_locale_data
      11.24%  29.19%       1414554         753       ls  [kernel.kallsyms]  [k] sched_clock_cpu
       8.50%   0.35%       1070150           9       ls  [kernel.kallsyms]  [k] check_chain_key
  ...


The patchset is based on following fix:
http://lkml.org/lkml/2013/2/4/122

and is available also at:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git
perf/group6

TODO: add column names as suggested by Ingo in the original discussion.

thanks,
jirka


Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
---
Jiri Olsa (11):
      perf ui/hist: Add support to display whole group data for raw columns
      perf: Add PERF_EVENT_IOC_ID ioctl to return event ID
      perf: Do not get values from disabled counters in group format read
      perf tools: Use PERF_EVENT_IOC_ID perf ioctl to read event id
      perf tools: Add support for parsing PERF_SAMPLE_READ sample type
      perf tools: Fix event ID retrieval for group format read case
      perf tools: Add perf_evlist__id2sid function to get event ID related data
      perf tools: Add PERF_SAMPLE_READ sample related processing
      perf tools: Add 'S' event/group modifier to read sample value
      perf tests: Add attr record group sampling test
      perf tests: Add parse events tests for leader sampling

 include/uapi/linux/perf_event.h                  |   1 +
 kernel/events/core.c                             |  12 ++++++++-
 tools/perf/Documentation/perf-list.txt           |   1 +
 tools/perf/tests/attr/test-record-group-sampling |  36 ++++++++++++++++++++++++++
 tools/perf/tests/parse-events.c                  | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/ui/hist.c                             |  53 +++++++++++++++++++-------------------
 tools/perf/util/event.h                          |  18 +++++++++++++
 tools/perf/util/evlist.c                         |  73 +++++++++++++++++++++++++++++++++++++++++++++++-----
 tools/perf/util/evlist.h                         |   4 +++
 tools/perf/util/evsel.c                          |  59 ++++++++++++++++++++++++++++++++++++++++--
 tools/perf/util/evsel.h                          |   4 +++
 tools/perf/util/parse-events.c                   |   8 +++++-
 tools/perf/util/parse-events.l                   |   2 +-
 tools/perf/util/session.c                        | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 14 files changed, 457 insertions(+), 39 deletions(-)

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2013-02-06  4:59 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-20 14:33 [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support Jiri Olsa
2012-10-20 14:33 ` [PATCH 01/11] perf: Add PERF_EVENT_IOC_ID ioctl to return event ID Jiri Olsa
2012-10-20 14:33 ` [PATCH 02/11] perf: Do not get values from disabled counters in group format read Jiri Olsa
2012-10-23 16:13   ` Peter Zijlstra
2012-10-23 16:50     ` Jiri Olsa
2012-10-24 12:01       ` Peter Zijlstra
2012-10-24 12:14         ` Jiri Olsa
2012-10-24 12:32           ` Peter Zijlstra
2012-10-24 16:03           ` Jiri Olsa
2012-10-20 14:33 ` [PATCH 03/11] perf tool: Use PERF_EVENT_IOC_ID perf ioctl to read event id Jiri Olsa
2012-10-22  7:57   ` Namhyung Kim
2012-10-22  8:40     ` Jiri Olsa
2012-10-20 14:33 ` [PATCH 04/11] perf tool: Add support for parsing PERF_SAMPLE_READ sample type Jiri Olsa
2012-10-22  8:56   ` Namhyung Kim
2012-10-20 14:33 ` [PATCH 05/11] perf tool: Fix event ID retrieval for group format read case Jiri Olsa
2012-10-20 14:33 ` [PATCH 06/11] perf tool: Add perf_evlist__id2sid function to get event ID related data Jiri Olsa
2012-10-20 14:33 ` [PATCH 07/11] perf tool: Add PERF_SAMPLE_READ sample related processing Jiri Olsa
2012-10-20 14:33 ` [PATCH 08/11] perf tool: Add 'S' event/group modifier to read sample value Jiri Olsa
2012-10-20 14:33 ` [PATCH 09/11] perf test: Add parse events tests for leader sampling Jiri Olsa
2012-10-22  8:58   ` Namhyung Kim
2012-10-22  9:12     ` Jiri Olsa
2012-10-20 14:33 ` [PATCH 10/11] perf tool: Display period values for all group members Jiri Olsa
2012-10-20 14:33 ` [PATCH 11/11] perf record: Fix mmap error output condition Jiri Olsa
2012-10-30 12:11   ` [tip:perf/core] " tip-bot for Jiri Olsa
2012-10-21 16:38 ` [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support Ingo Molnar
2012-10-22  8:09   ` Jiri Olsa
2012-10-22  8:51     ` Namhyung Kim
2012-10-22  9:15       ` Jiri Olsa
2012-10-22  7:32 ` Namhyung Kim
2012-10-22  7:53   ` Jiri Olsa
2012-10-22  8:53     ` Namhyung Kim
2012-10-22  9:06       ` Jiri Olsa
2012-10-26  1:29 ` Namhyung Kim
2012-10-26  9:14   ` Peter Zijlstra
2012-10-26 10:23     ` Jiri Olsa
2012-10-26 15:39       ` Namhyung Kim
2012-10-26 16:14         ` David Ahern
2012-10-26 16:25           ` Namhyung Kim
2012-10-26 16:47             ` David Ahern
2012-10-26 17:00         ` Arnaldo Carvalho de Melo
2013-02-04 12:32 Jiri Olsa
2013-02-06  4:59 ` Namhyung Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.