All of lore.kernel.org
 help / color / mirror / Atom feed
* Howto: Using KVM TRACE
@ 2008-06-24 20:49 Jerone Young
  0 siblings, 0 replies; only message in thread
From: Jerone Young @ 2008-06-24 20:49 UTC (permalink / raw)
  To: kvm-ppc

This is a short HOWTO for using KVM TRACE.

1) Enable Kernel
========
Enable CONFIG_KVM_TRACE in your kernel config. You will enable
CONFIG_MARKERS & CONFIG_SYSFS to enable. CONFIG_DEBUG_FS should be
enabled once you enable KVM_TRACE.

Build and boot.

2) Mount debugfs
========
You must mount debugfs before using kvmtrace. One way to do this is
by placing an entry into your /etc/fstab , such as the following:

debugfs    /sys/kernel/debug       debugfs defaults        0 0

Reboot and it will mounted. 

3) Build kvmtrace tool
===========
Go to kvm-userspace directory. Configure the directory with the
configure command. Then go to "kvm-userspace/user" directory and type
command: "make kvmtrace".

This will build the trace tool you'll need to generate your trace file.
Copy tool over to machine, so you can execute it later.

4) Running kvmtrace
==========Once on kvm host start a guest. To trace KVM use the kvmtrace tool, like
in the following example.
          ./kvmtrace -o TRACE1 -w 5

This will run kvmtrace tool for 5 seconds and produce a binary file with
your trace output named "TRACE1.kvmtrace.0".

5) Reading the data
===========
Copy file with trace output to somewhere you can access. Go back into
kvm-userspace/user directory. You will need two files:

-kvmtrace_format
-formats <-- file describes how to printout the kvmtrace events into a
readable form

Make sure your system has python. Now run kvmtrace_format like the
following:

     cat TRACE1.kvmtrace.0 | ./kvmtrace_format formats

You will then see your trace points displayed in a readable form.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-24 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 20:49 Howto: Using KVM TRACE Jerone Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.