public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4 0/9] perf mem/c2c: Support AUX trace
@ 2020-11-06  9:48 Leo Yan
  2020-11-06  9:48 ` [PATCH v4 1/9] perf mem: Search event name with more flexible path Leo Yan
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Leo Yan @ 2020-11-06  9:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa, Ian Rogers, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Namhyung Kim,
	John Garry, Will Deacon, Mathieu Poirier, Adrian Hunter,
	Andi Kleen, Kemeng Shi, Sergey Senozhatsky, Al Grant, James Clark,
	Wei Li, Andre Przywara, linux-kernel, linux-arm-kernel
  Cc: Leo Yan

This patch series is v4 for support perf mem/c2c AUX trace.

Comparing to patch set v3, this patch set adds back the patch 06/09 for
introducing the itrace option '-M', this allows to synthenize memory
event from the AUX trace data.

Since perf mem/c2c tools are focus on memory profiling, this patch set
makes itrace memory event as default for perf mem/c2c, the tool will
tell AUX trace decoder that it is _ONLY_ interested in memory event
rather than other itrace events.  So patches 07, 08 have updated
'itrace_synth_opts' for this.

This patch has dropped the memory type 'ldst' and keeps to use the old
types 'load' and 'store', if user passes the type 'load,store', the tool
can automatically use PERF_MEM_EVENTS__LOAD_STORE event if arch supports
it, otherwise, rolls back to enable both LOAD and STORE events.  So we
don't need to do any change for tool's usage.

This patch set has been applied clearly on the perf/core branch with the
latest commit 7b3bcedf5ee5 ("perf scripting python: Avoid declaring
function pointers with a visibility attribute").

This patch set has been verified on both x86 and Arm64.

On x86, below commands have been tested:

  # perf c2c record -- ~/false_sharing.exe 2
  # perf c2c record -e ldlat-loads  -- ~/false_sharing.exe 2
  # perf c2c record -e ldlat-stores  -- ~/false_sharing.exe 2
  # perf mem record -- ~/false_sharing.exe 2
  # perf mem record -t load -- ~/false_sharing.exe 2
  # perf mem record -t store -- ~/false_sharing.exe 2
  # perf mem record -t load,store -- ~/false_sharing.exe 2
  # perf mem record -e ldlat-loads  -- ~/false_sharing.exe 2
  # perf mem record -e ldlat-stores  -- ~/false_sharing.exe 2

On Arm64, below commands have been tested:

  # perf c2c record -- ~/false_sharing.exe 2
  # perf c2c record -e spe-load  -- ~/false_sharing.exe 2
  # perf c2c record -e spe-store  -- ~/false_sharing.exe 2
  # perf c2c record -e spe-ldst  -- ~/false_sharing.exe 2
  # perf mem record -- ~/false_sharing.exe 2
  # perf mem record -t load -- ~/false_sharing.exe 2
  # perf mem record -t store -- ~/false_sharing.exe 2
  # perf mem record -t load,store -- ~/false_sharing.exe 2
  # perf mem record -e spe-load  -- ~/false_sharing.exe 2
  # perf mem record -e spe-store  -- ~/false_sharing.exe 2
  # perf mem record -e spe-ldst  -- ~/false_sharing.exe 2

Changes from v3:
* Added back the patch 06/09 for introducing the itrace option '-M'
  (Jiri);
* Added 'itrace_synth_opts' for memory event (Jiri);
* Dropped type 'ldst' so don't change any usages for tools (Ian);
* Dropped the patch "perf mem: Return NULL for event 'ldst' on
  PowerPC" due type 'ldst' is not added anymore (Ian);
* Added patch 04/09 "perf c2c: Support memory event
  PERF_MEM_EVENTS__LOAD_STORE", so can convert the load/store requests
  to event PERF_MEM_EVENTS__LOAD_STORE (James Clark).


Leo Yan (9):
  perf mem: Search event name with more flexible path
  perf mem: Introduce weak function perf_mem_events__ptr()
  perf mem: Support new memory event PERF_MEM_EVENTS__LOAD_STORE
  perf c2c: Support memory event PERF_MEM_EVENTS__LOAD_STORE
  perf mem: Only initialize memory event for recording
  perf auxtrace: Add itrace option '-M' for memory events
  perf mem: Support AUX trace
  perf c2c: Support AUX trace
  perf mem: Support Arm SPE events

 tools/perf/Documentation/itrace.txt     |  1 +
 tools/perf/arch/arm64/util/Build        |  2 +-
 tools/perf/arch/arm64/util/mem-events.c | 37 ++++++++++++++++
 tools/perf/builtin-c2c.c                | 39 ++++++++++++++---
 tools/perf/builtin-mem.c                | 56 +++++++++++++++++++------
 tools/perf/util/auxtrace.c              |  4 ++
 tools/perf/util/auxtrace.h              |  2 +
 tools/perf/util/mem-events.c            | 45 +++++++++++++++-----
 tools/perf/util/mem-events.h            |  3 +-
 9 files changed, 158 insertions(+), 31 deletions(-)
 create mode 100644 tools/perf/arch/arm64/util/mem-events.c

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-11-11 12:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-06  9:48 [PATCH v4 0/9] perf mem/c2c: Support AUX trace Leo Yan
2020-11-06  9:48 ` [PATCH v4 1/9] perf mem: Search event name with more flexible path Leo Yan
2020-11-06  9:48 ` [PATCH v4 2/9] perf mem: Introduce weak function perf_mem_events__ptr() Leo Yan
2020-11-06  9:48 ` [PATCH v4 3/9] perf mem: Support new memory event PERF_MEM_EVENTS__LOAD_STORE Leo Yan
2020-11-06  9:48 ` [PATCH v4 4/9] perf c2c: Support " Leo Yan
2020-11-06  9:48 ` [PATCH v4 5/9] perf mem: Only initialize memory event for recording Leo Yan
2020-11-06  9:48 ` [PATCH v4 6/9] perf auxtrace: Add itrace option '-M' for memory events Leo Yan
2020-11-06  9:48 ` [PATCH v4 7/9] perf mem: Support AUX trace Leo Yan
2020-11-06  9:48 ` [PATCH v4 8/9] perf c2c: " Leo Yan
2020-11-06  9:48 ` [PATCH v4 9/9] perf mem: Support Arm SPE events Leo Yan
2020-11-11 12:35 ` [PATCH v4 0/9] perf mem/c2c: Support AUX trace Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox