perf scripts python: intel-pt-events.py: Add branches to script
As an example, add branch information to intel-pt-events.py script. This shows how a simple python script can be used to customize perf script output for Intel PT branch traces or power event traces. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/r/20210525095112.1399-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2ede92173f
commit
a92bf335fd
3 changed files with 116 additions and 35 deletions
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# print Intel PT Power Events and PTWRITE. The intel_pt PMU event needs
|
||||
# to be specified with appropriate config terms.
|
||||
# print Intel PT Events including 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/"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
# description: print Intel PT Power Events and PTWRITE
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py
|
||||
# description: print Intel PT Events including 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