On 02/16/2012 01:05 PM, David Ahern wrote: > On 2/15/12 9:59 PM, Xiao Guangrong wrote: >> >> >> Okay, i will post the next version after collecting your new comments! >> >> Thanks for your time, David! :) >> > > I had more comments, but got sidetracked and forgot to come back to this. I still haven't looked at the code yet, but some comments from testing: > > 1. The error message: > Warning: Error: expected type 5 but read 4 > Warning: Error: expected type 5 but read 0 > Warning: unknown op '}' > > is fixed by this patch which has not yet made its way into perf: > https://lkml.org/lkml/2011/9/4/41 > > The most recent request: > https://lkml.org/lkml/2012/2/8/479 > > Arnaldo: the patch still applies cleanly (but with an offset of -2 lines). > Great, it is a good fix. But, it does not hurt the development of kvm-events. > > 2. negatve testing: > > perf kvm-events record -e kvm:* -p 2603 -- sleep 10 > > Warning: Error: expected type 4 but read 7 > Warning: Error: expected type 5 but read 0 > Warning: failed to read event print fmt for kvm_apic > Warning: Error: expected type 4 but read 7 > Warning: Error: expected type 5 but read 0 > Warning: failed to read event print fmt for kvm_inj_exception > Fatal: bad op token { > > If other kvm events are specified in the record line they appear to be silently ignored in the report in which case why allow the -e option to record? > Yes, kvm-events doese not analyse these events specified by -e option since these events are not needed by vmexit/ioport/mmio analysis. And after kvm-evnets record, you can see these events by perf script > > 3. What is happening for multiple VMs? > > a. perf kvm-events report > data is collected for all VMs. What is displayed in the report? An > average for all VMs? > Yes > b. perf kvm-events report --vcpu 1 > Does this given an average of all vcpu 1's? > Yes > Perhaps a -p option for the report to pull out events related to a single VM. Really this could be a generic option (to perf-report and perf-script as well) to only show/analyze events for the specified pid. ie., data is recorded for all VMs (or system wide for the regular perf-record) and you want to only consider events for a specific pid. e.g., in process_sample_event() skip event if event->ip.pid != report_pid (works for perf code because PERF_SAMPLE_TID attribute is always set). Analysis for per VMs is good idea, but please allow me put it into my TODO list. :) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html