History

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.

Adrian Hunter committed 5 years ago

Commit a92bf331 parent 2ede9213 files · +116 −35Browse files

Showing the changes to tools/perf/scripts/python/bin (2 of 3 files). Show all

Unified · Split

2 files
  1. tools/perf/scripts/python/bin/intel-pt-events-record +2 −2
  2. tools/perf/scripts/python/bin/intel-pt-events-report +2 −2
tools/perf/scripts/python/bin/intel-pt-events-record+2−2
@@ -1,8 +1,8 @@
1#!/bin/bash1#!/bin/bash
2 2
3#3#
4# print Intel PT Power Events and PTWRITE. The intel_pt PMU event needs4# print Intel PT Events including Power Events and PTWRITE. The intel_pt PMU
5# to be specified with appropriate config terms.5# event needs to be specified with appropriate config terms.
6#6#
7if ! echo "$@" | grep -q intel_pt ; then7if ! echo "$@" | grep -q intel_pt ; then
8 echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/"8 echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/"
tools/perf/scripts/python/bin/intel-pt-events-report+2−2
@@ -1,3 +1,3 @@
1#!/bin/bash1#!/bin/bash
2# description: print Intel PT Power Events and PTWRITE2# description: print Intel PT Events including Power Events and PTWRITE
3perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py3perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py