On 01/16/2012 07:41 PM, Xiao Guangrong wrote: >> Have you thought about dumping a time history -- something similar to >> what perf-script can do with dumping events but adding in kvm-specific >> analysis like what you are doing in these examples? >> > > > I will look into it and put it to my todo list if it is possible. > Thanks, David! > I've played around with ways to do it as time (and motivation) allowed. Attached is one example using perf with the trace-cmd plugin plus a patch on perf-script to dump time between events: perf record -e kvm:* -fo /tmp/perf.data -p 2540 -- sleep 1 perf script -i /tmp/perf.data The output of perf-script is in the attached file. The 5th column is the dt between successive events which is mainly a convenience. A perf-kvm-events type command would allow more customization in the output -- like correlating specific events and computing total time between exit and entry accounting for HLT reasons -- as well as various statistical dumps (average, stddev, max/min, histograms). David