1cc892720SAdrian Hunter#!/bin/bash 2cc892720SAdrian Hunter 3cc892720SAdrian Hunter# 4*a92bf335SAdrian Hunter# print Intel PT Events including Power Events and PTWRITE. The intel_pt PMU 5*a92bf335SAdrian Hunter# event needs to be specified with appropriate config terms. 6cc892720SAdrian Hunter# 7cc892720SAdrian Hunterif ! echo "$@" | grep -q intel_pt ; then 8cc892720SAdrian Hunter echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/" 9cc892720SAdrian Hunter echo "and for power events it probably needs to be system wide i.e. -a option" 10cc892720SAdrian Hunter echo "For example: -a -e intel_pt/pwr_evt,branch=0/ sleep 1" 11cc892720SAdrian Hunter exit 1 12cc892720SAdrian Hunterfi 13cc892720SAdrian Hunterperf record $@ 14