Skip to content

Instantly share code, notes, and snippets.

@mdcallag
Created June 21, 2017 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdcallag/a675e113e915a8f2e3c06282c464bd83 to your computer and use it in GitHub Desktop.
Save mdcallag/a675e113e915a8f2e3c06282c464bd83 to your computer and use it in GitHub Desktop.
secs=$1
ts=$( date +'%m%d_%H%M%S' )
perf stat -a sleep $secs > p.${ts} 2>&1
perf stat -e cycles,instructions,cache-references,cache-misses,bus-cycles -a sleep $secs >> p.${ts} 2>&1
perf stat -e 'syscalls:sys_enter_*' -a sleep $secs >> p.${ts} 2>&1
perf stat -e L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores -a sleep $secs >> p.${ts} 2>&1
perf stat -e dTLB-loads,dTLB-load-misses,dTLB-prefetch-misses -a sleep $secs >> p.${ts} 2>&1
perf stat -e LLC-loads,LLC-load-misses,LLC-stores,LLC-prefetches -a sleep $secs >> p.${ts} 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment