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.
Showing the changes to tools/perf/scripts/python/bin (2 of 3 files). Show all
Unified · Split
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | #!/bin/bash |
| 2 | 2 | |
| 3 | 3 | # |
| 4 | −# print Intel PT Power Events and PTWRITE. The intel_pt PMU event needs | |
| 5 | −# to be specified with appropriate config terms. | |
| 4 | +# print Intel PT Events including Power Events and PTWRITE. The intel_pt PMU | |
| 5 | +# event needs to be specified with appropriate config terms. | |
| 6 | 6 | # |
| 7 | 7 | if ! echo "$@" | grep -q intel_pt ; then |
| 8 | 8 | echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/" |
| @@ -1,3 +1,3 @@ | ||
| 1 | 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 | |
| 2 | +# description: print Intel PT Events including Power Events and PTWRITE | |
| 3 | +perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py | |