Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Jes Sorensen
On 05/13/10 16:57, Avi Kivity wrote: On 05/13/2010 05:35 PM, Stefan Hajnoczi wrote: How to count and trace KVM perf events: http://www.linux-kvm.org/page/Perf_events I want to draw attention to this because traditional kvm_stat and kvm_trace use has been moving over to the debugfs based

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Avi Kivity
On 05/20/2010 11:15 AM, Jes Sorensen wrote: On 05/13/10 16:57, Avi Kivity wrote: On 05/13/2010 05:35 PM, Stefan Hajnoczi wrote: How to count and trace KVM perf events: http://www.linux-kvm.org/page/Perf_events I want to draw attention to this because traditional kvm_stat and

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Jes Sorensen
On 05/20/10 10:19, Avi Kivity wrote: On 05/20/2010 11:15 AM, Jes Sorensen wrote: Two things are missing to make this really useful: - a continuously updating difference mode like kvm_stat - subevents; for example kvm:kvm_exit is an aggregate of all exit types that can be split using

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Stefan Hajnoczi
8330 kvm:kvm_entry# 0.000 M/sec ^--- count since starting perf The 8330 number means that kvm_entry has fired 8330 times since perf was started. Like Avi says, you need to keep the perf process running. I run benchmarks using a script that kills perf after the benchmark

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Avi Kivity
On 05/20/2010 02:05 PM, Stefan Hajnoczi wrote: 8330 kvm:kvm_entry# 0.000 M/sec ^--- count since starting perf The 8330 number means that kvm_entry has fired 8330 times since perf was started. Like Avi says, you need to keep the perf process running. I run benchmarks using a

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Jes Sorensen
On 05/20/10 13:10, Avi Kivity wrote: On 05/20/2010 02:05 PM, Stefan Hajnoczi wrote: Jes, you're right, something like perf stat -e kvm:* --start and perf stat --stop would be more usable for system-wide monitoring. I wonder if it is possible to support this or whether the perf process needs

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Stefan Hajnoczi
On Thu, May 20, 2010 at 12:16 PM, Jes Sorensen jes.soren...@redhat.com wrote: On 05/20/10 13:10, Avi Kivity wrote: What's wrong with starting perf after the warm-up period and stopping it before it's done? It's pretty hard to script. I use the following. It ain't pretty: #!/bin/bash

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Avi Kivity
On 05/20/2010 02:23 PM, Stefan Hajnoczi wrote: On Thu, May 20, 2010 at 12:16 PM, Jes Sorensenjes.soren...@redhat.com wrote: On 05/20/10 13:10, Avi Kivity wrote: What's wrong with starting perf after the warm-up period and stopping it before it's done? It's pretty hard to

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Stefan Hajnoczi
On Thu, May 20, 2010 at 1:14 PM, Avi Kivity a...@redhat.com wrote: echo 1/sys/kernel/debug/tracing/events/kvm/enable cat /sys/kernel/debug/tracing/trace_piperesults/trace perf will enable the events by itself (no?), so all you need is is the perf call in the middle. Yes, it will enable

Re: Wiki docs on counting and tracing KVM perf events

2010-05-20 Thread Avi Kivity
On 05/20/2010 03:24 PM, Stefan Hajnoczi wrote: On Thu, May 20, 2010 at 1:14 PM, Avi Kivitya...@redhat.com wrote: echo 1/sys/kernel/debug/tracing/events/kvm/enable cat /sys/kernel/debug/tracing/trace_piperesults/trace perf will enable the events by itself (no?), so all you need is

Wiki docs on counting and tracing KVM perf events

2010-05-13 Thread Stefan Hajnoczi
How to count and trace KVM perf events: http://www.linux-kvm.org/page/Perf_events I want to draw attention to this because traditional kvm_stat and kvm_trace use has been moving over to the debugfs based tracing mechanisms. Perhaps we can flesh out documentation and examples of common perf