public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* kvmtrace?
@ 2008-07-07  0:44 Jun Koi
  2008-07-07 14:07 ` kvmtrace? Christian Ehrhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Jun Koi @ 2008-07-07  0:44 UTC (permalink / raw)
  To: kvm

Hi,

Could anybody explain a bit about kvmtrace? I cannot find any doc on
it anywhere.

- Is there any short usage instruction for kvmtrace?
- Which kind of data kvmtrace can collect?

Many thanks,
Jun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kvmtrace?
  2008-07-07  0:44 kvmtrace? Jun Koi
@ 2008-07-07 14:07 ` Christian Ehrhardt
  2008-07-07 15:34   ` kvmtrace? Jun Koi
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Ehrhardt @ 2008-07-07 14:07 UTC (permalink / raw)
  To: Jun Koi; +Cc: kvm

Jun Koi wrote:
> Hi,
>
> Could anybody explain a bit about kvmtrace? I cannot find any doc on
> it anywhere.
>
> - Is there any short usage instruction for kvmtrace?
>   
I don't know if there is an official doc yet, but you can just start 
with the simple version like:
   ./kvmtrace -o outfile -w 5
which traces for 5 seconds to outfile.*

After that you can cat that file and pipe it to kvmtrace_format which 
converts it to a readable file:
   cat outfile.kvmtrace.0 | ./kvmtrace_format formats

formats is a simple file defining how to present the trace records.

> - Which kind of data kvmtrace can collect?
>   
Due to the structure of the "formats" file (lockated in 
kvm-userspace/user/formats) this is also a list of the event types 
currently tracked - it is readable ascii and lists event+additional data 
reported.

Both kvmtrace (c) & kvmtrace_formats (python) are not very big (yet) so 
if you want to go further just look into the code. While I'm sure that 
it will grow in complexity in the future it's clearly arranged and easy 
to read atm.

> Many thanks,
> Jun
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


-- 

Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kvmtrace?
  2008-07-07 14:07 ` kvmtrace? Christian Ehrhardt
@ 2008-07-07 15:34   ` Jun Koi
  2008-07-10 10:01     ` kvmtrace? Christian Ehrhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Jun Koi @ 2008-07-07 15:34 UTC (permalink / raw)
  To: Christian Ehrhardt; +Cc: kvm

On Mon, Jul 7, 2008 at 11:07 PM, Christian Ehrhardt
<ehrhardt@linux.vnet.ibm.com> wrote:
> Jun Koi wrote:
>>
>> Hi,
>>
>> Could anybody explain a bit about kvmtrace? I cannot find any doc on
>> it anywhere.
>>
>> - Is there any short usage instruction for kvmtrace?
>>
>
> I don't know if there is an official doc yet, but you can just start with
> the simple version like:
>  ./kvmtrace -o outfile -w 5
> which traces for 5 seconds to outfile.*

This really surprises me. I expected that we can collect trace for a
specific VM. But it seems that we always trace all the VMs currently
running??

With trace feature always ON, I guess we suffer some overhead, right?
Perhaps the overhead is little, but still we have. If so, is there
anyway to turn the trace feature OFF?

Many thanks,
Jun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kvmtrace?
  2008-07-07 15:34   ` kvmtrace? Jun Koi
@ 2008-07-10 10:01     ` Christian Ehrhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Ehrhardt @ 2008-07-10 10:01 UTC (permalink / raw)
  To: Jun Koi; +Cc: kvm

On Monday 07 July 2008 17:34:13 Jun Koi wrote:
> On Mon, Jul 7, 2008 at 11:07 PM, Christian Ehrhardt
>
> <ehrhardt@linux.vnet.ibm.com> wrote:
> > Jun Koi wrote:
> >> Hi,
> >>
> >> Could anybody explain a bit about kvmtrace? I cannot find any doc on
> >> it anywhere.
> >>
> >> - Is there any short usage instruction for kvmtrace?
> >
> > I don't know if there is an official doc yet, but you can just start with
> > the simple version like:
> >  ./kvmtrace -o outfile -w 5
> > which traces for 5 seconds to outfile.*
>
> This really surprises me. I expected that we can collect trace for a
> specific VM. But it seems that we always trace all the VMs currently
> running??

usually you want to trace all to ensure that you can interpret sideeffects.
Otherwise you might often urn into wrong interpretation or a good assumption 
and you would "just" need the data for the other guests to ensure your 
theory.
Anyway if you really think we need it you might code it in the probe function
near the head of kvm_add_trace, there is a check for KVM_TRACE_STATE_RUNNING
and there you could easily implement some filter mechanism (you'll want to 
extend the ioctls too to get your mask).
But anyway, as I mentioned you usually want all data to "be sure" what you see 
in your trace.

The only scenario where I think we would really need a mask is in very big 
many guest scenarios, but today I think no one except the s390 guys have 
enough guests to have that need practically.

> With trace feature always ON, I guess we suffer some overhead, right?
> Perhaps the overhead is little, but still we have. If so, is there
> anyway to turn the trace feature OFF?

Well, you can turn it off permanent by disabling CONFIG_KVM_TRACE.
But be aware that kvm_trace uses the markers infrastructure (see 
Documentation/markers.txt) which means that the overhead is really really low 
as long as you don't actively use kvmtrace (invoked via the userspace tool).
And if you use it, well then it should do something ;-)

> Many thanks,
> Jun
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 

Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-10 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07  0:44 kvmtrace? Jun Koi
2008-07-07 14:07 ` kvmtrace? Christian Ehrhardt
2008-07-07 15:34   ` kvmtrace? Jun Koi
2008-07-10 10:01     ` kvmtrace? Christian Ehrhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox