mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
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>
This commit is contained in:
parent
3797307576
commit
cc892720d8
3 changed files with 144 additions and 0 deletions
13
tools/perf/scripts/python/bin/intel-pt-events-record
Normal file
13
tools/perf/scripts/python/bin/intel-pt-events-record
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# print Intel PT Power Events and PTWRITE. The intel_pt PMU event needs
|
||||
# to be specified with appropriate config terms.
|
||||
#
|
||||
if ! echo "$@" | grep -q intel_pt ; then
|
||||
echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/"
|
||||
echo "and for power events it probably needs to be system wide i.e. -a option"
|
||||
echo "For example: -a -e intel_pt/pwr_evt,branch=0/ sleep 1"
|
||||
exit 1
|
||||
fi
|
||||
perf record $@
|
3
tools/perf/scripts/python/bin/intel-pt-events-report
Normal file
3
tools/perf/scripts/python/bin/intel-pt-events-report
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
# description: print Intel PT Power Events and PTWRITE
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py
|
Loading…
Add table
Add a link
Reference in a new issue