brendangregg/pmc-cloud-tools

tlbstat: duration isn't implemented for the default "all CPUs" mode

martinvonwittich opened this issue · 0 comments

./tlbstat 1 10

I had expected tlbstat to stop after 10 seconds, but instead it runs forever. This is due to the fact that sleep $duration is only passed to perf if the -C or -p option is given:

pmc-cloud-tools/tlbstat

Lines 70 to 73 in 5d4df1e

target=-a
(( opt_cpu )) && target="-C $cpu sleep $duration"
(( opt_pid )) && target="-p $pid sleep $duration"
(( opt_cmd )) && target="$cmd"