All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V8 0/7] perf: Driver specific configuration for PMU
@ 2016-09-16 15:49 ` Mathieu Poirier
  0 siblings, 0 replies; 22+ messages in thread
From: Mathieu Poirier @ 2016-09-16 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

This iteration split the __get_cpuid() work in the main Makefile and 
moves the driver configuration code out of file evlist.c and evsel.c so
that `perf test python` can succeed.  Other than moving things around
this set is keeping the code and functionality unchanged. 

Also tested with `make -C tool/perf build-test`

Thanks,
Mathieu


Original blurb:
---------------

This patchset adds the possiblity of specifying PMU driver configuration
directly from the perf command line.  Anything that falls within the
event specifiers '/.../' and that is preceded by the '@' symbol is
treated as a configurable.  Two formats are supported, @cfg and
@cfg=config.

For example:

perf record -e some_event/@cfg1/ ...

or

perf record -e some_event/@cfg2=config/ ...

or

perf record -e some_event/@cfg1, at cfg2=config/ ...

The above are all valid configuration and will see the strings 'cfg1'
and 'cfg2=config' sent to the PMU driver for parsing and interpretation
using the existing ioctl() mechanism.

The primary customers for this feature are the CoreSight drivers where
the selection of a sink (where trace data is accumulated) needs to be
done in a previous, and separated step, from the launching of the perf
command.

As such something that used to be a two-step process:

# echo 1 > /sys/bus/coresight/devices/20070000.etr/enable_sink
# perf record -e cs_etm//u --per-thread  uname

is integrated in a single command:

# perf record -e cs_etm/@20070000.etr/u --per-thread  uname

---
Changes for V8:
- Splitted what used to be 1/5 in the V7 patchset. 
- Moved code around to avoid failing 'perf test pythong'.
- Tested with `make -C tool/perf build-test`.

Changes for V7:
- Got rid of a miscellaneous debug message.
- Rebased to v4.8-rc4
- Added Jiri Olsa's Acked-by.

Changes for V6:
- Using sysFS rather than an ioctl() to communicate command line
  parameters to the CoreSight PMU.

Changes for V5:
- Made commit log in 5/9 more descriptive.
- Addressed missing return code in builtin-top.c.
- Overhauled the kernel portion to do parsing in the core.

Changes for V4:
- Pushing PMU driver configuration for 'perf top'.
- Rebased to the latest perf/core branch[1]. 

Changes for V3:
- Added comment for function drv_str() that explains the reason for
  keeping the entire token intact.
- Added driver config terms to the existing list of config terms.
- Added documenation for driver specific configuration.
- Pushing PMU driver configuration for 'perf stat' as well.  
- Preventing users from selecting a sink from sysFS _and_ perf.

Changes for V2:
- Rebased to [1] as per Jiri's request.


Mathieu Poirier (7):
  perf tools: confining __get_cpuid() to x86 architecture
  perf tools: making coresight PMU listable
  perf tools: adding coresight etm PMU record capabilities
  perf tools: add infrastructure for PMU specific configuration
  perf tools: pushing configuration down to PMU driver
  perf tools: adding PMU configuration to tools
  perf tools: adding sink configuration for cs_etm PMU

 MAINTAINERS                              |   5 +
 tools/perf/Documentation/perf-record.txt |  12 +
 tools/perf/Makefile.config               |  11 +-
 tools/perf/arch/arm/util/Build           |   2 +
 tools/perf/arch/arm/util/auxtrace.c      |  54 +++
 tools/perf/arch/arm/util/cs-etm.c        | 617 +++++++++++++++++++++++++++++++
 tools/perf/arch/arm/util/cs-etm.h        |  26 ++
 tools/perf/arch/arm/util/pmu.c           |  36 ++
 tools/perf/arch/arm64/util/Build         |   4 +
 tools/perf/builtin-record.c              |  10 +
 tools/perf/builtin-stat.c                |   9 +
 tools/perf/builtin-top.c                 |  13 +
 tools/perf/util/Build                    |   1 +
 tools/perf/util/auxtrace.c               |   1 +
 tools/perf/util/auxtrace.h               |   1 +
 tools/perf/util/cs-etm.h                 |  74 ++++
 tools/perf/util/drv_configs.c            |  77 ++++
 tools/perf/util/drv_configs.h            |  26 ++
 tools/perf/util/evsel.h                  |   2 +
 tools/perf/util/parse-events.c           |   7 +-
 tools/perf/util/parse-events.h           |   1 +
 tools/perf/util/parse-events.l           |  22 ++
 tools/perf/util/parse-events.y           |  11 +
 tools/perf/util/pmu.h                    |   2 +
 24 files changed, 1019 insertions(+), 5 deletions(-)
 create mode 100644 tools/perf/arch/arm/util/auxtrace.c
 create mode 100644 tools/perf/arch/arm/util/cs-etm.c
 create mode 100644 tools/perf/arch/arm/util/cs-etm.h
 create mode 100644 tools/perf/arch/arm/util/pmu.c
 create mode 100644 tools/perf/util/cs-etm.h
 create mode 100644 tools/perf/util/drv_configs.c
 create mode 100644 tools/perf/util/drv_configs.h

-- 
2.7.4

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

end of thread, other threads:[~2016-09-23  5:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16 15:49 [PATCH V8 0/7] perf: Driver specific configuration for PMU Mathieu Poirier
2016-09-16 15:49 ` Mathieu Poirier
2016-09-16 15:49 ` [PATCH V8 1/7] perf tools: confining __get_cpuid() to x86 architecture Mathieu Poirier
2016-09-16 15:49   ` Mathieu Poirier
2016-09-23  5:25   ` [tip:perf/core] perf tools: Confine " tip-bot for Mathieu Poirier
2016-09-16 15:49 ` [PATCH V8 2/7] perf tools: making coresight PMU listable Mathieu Poirier
2016-09-16 15:49   ` Mathieu Poirier
2016-09-23  5:26   ` [tip:perf/core] perf tools: Make " tip-bot for Mathieu Poirier
2016-09-16 15:50 ` [PATCH V8 3/7] perf tools: adding coresight etm PMU record capabilities Mathieu Poirier
2016-09-16 15:50   ` Mathieu Poirier
2016-09-23  5:26   ` [tip:perf/core] perf tools: Add " tip-bot for Mathieu Poirier
2016-09-16 15:50 ` [PATCH V8 4/7] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier
2016-09-16 15:50   ` Mathieu Poirier
2016-09-16 15:50 ` [PATCH V8 5/7] perf tools: pushing configuration down to PMU driver Mathieu Poirier
2016-09-16 15:50   ` Mathieu Poirier
2016-09-23  5:27   ` [tip:perf/core] perf pmu: Push " tip-bot for Mathieu Poirier
2016-09-16 15:50 ` [PATCH V8 6/7] perf tools: adding PMU configuration to tools Mathieu Poirier
2016-09-16 15:50   ` Mathieu Poirier
2016-09-23  5:27   ` [tip:perf/core] perf tools: Add " tip-bot for Mathieu Poirier
2016-09-16 15:50 ` [PATCH V8 7/7] perf tools: adding sink configuration for cs_etm PMU Mathieu Poirier
2016-09-16 15:50   ` Mathieu Poirier
2016-09-23  5:28   ` [tip:perf/core] perf tools: Add " tip-bot for Mathieu Poirier

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.