diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2017-05-26 04:17:35 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-06-30 10:50:53 -0400 |
commit | cc892720d85a31cc04f4c01c03d88a0eb3c437fa (patch) | |
tree | 8563fcf24e6590d75f610aa9422b16dbfb54f597 /tools/perf/scripts/python/bin | |
parent | 3797307576191d7fb4c974cd461188162ac36f33 (diff) |
perf intel-pt: Add example script for power events and PTWRITE
Add script intel-pt-events.py that provides an example of how to unpack the
raw data for power events and PTWRITE.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1495786658-18063-35-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
-rw-r--r-- | tools/perf/scripts/python/bin/intel-pt-events-record | 13 | ||||
-rw-r--r-- | tools/perf/scripts/python/bin/intel-pt-events-report | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tools/perf/scripts/python/bin/intel-pt-events-record b/tools/perf/scripts/python/bin/intel-pt-events-record new file mode 100644 index 000000000000..10fe2b6977d4 --- /dev/null +++ b/tools/perf/scripts/python/bin/intel-pt-events-record | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # | ||
4 | # print Intel PT Power Events and PTWRITE. The intel_pt PMU event needs | ||
5 | # to be specified with appropriate config terms. | ||
6 | # | ||
7 | if ! echo "$@" | grep -q intel_pt ; then | ||
8 | echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/" | ||
9 | echo "and for power events it probably needs to be system wide i.e. -a option" | ||
10 | echo "For example: -a -e intel_pt/pwr_evt,branch=0/ sleep 1" | ||
11 | exit 1 | ||
12 | fi | ||
13 | perf record $@ | ||
diff --git a/tools/perf/scripts/python/bin/intel-pt-events-report b/tools/perf/scripts/python/bin/intel-pt-events-report new file mode 100644 index 000000000000..9a9c92fcd026 --- /dev/null +++ b/tools/perf/scripts/python/bin/intel-pt-events-report | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/bash | ||
2 | # description: print Intel PT Power Events and PTWRITE | ||
3 | perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py \ No newline at end of file | ||