14 lines · plain
1#!/bin/bash2 3#4# print Intel PT Events including Power Events and PTWRITE. The intel_pt PMU5# event needs to be specified with appropriate config terms.6#7if ! echo "$@" | grep -q intel_pt ; then8 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 112fi13perf record $@14