Patchwork Tracing documentation changes

login
register
mail settings
Submitter Peter Teoh
Date March 11, 2012, 4:13 p.m.
Message ID <CAHnt0GW_+xzrT98BGOtM59csC0LFm_SZLhHuD2fr-er=o1fUqw@mail.gmail.com>
Download mbox | patch
Permalink /patch/146017/
State New
Headers show

Comments

Peter Teoh - March 11, 2012, 4:13 p.m.
I was trying out the tracing feature of QEMU after checking out the
git tree at git://git.qemu.org/qemu.git, and managed to generate some
traces, but the following are the changes needed to the documentation,
in order to successfully generate the tracing.

Some comments:  qemu-system-i386 was used because the present git tree
does not generate any qemu binary at all.

Comments?

--
Regards,
Peter Teoh
Stefan Hajnoczi - March 12, 2012, 10:14 a.m.
On Sun, Mar 11, 2012 at 4:13 PM, Peter Teoh <htmldeveloper@gmail.com> wrote:
> I was trying out the tracing feature of QEMU after checking out the
> git tree at git://git.qemu.org/qemu.git, and managed to generate some
> traces, but the following are the changes needed to the documentation,
> in order to successfully generate the tracing.
>
> Some comments:  qemu-system-i386 was used because the present git tree
> does not generate any qemu binary at all.
>
> Comments?

Thanks for the documentation update.

Please see http://wiki.qemu.org/Contribute/SubmitAPatch.

Although i386-specific command-lines are helpful to someone using QEMU
for the first time, they are subject to change so I'd rather not
include them.

The ./configure --enable-trace-backend fix has been submitted and I
will send a pull request shortly.

The scripts/simpletrace.py update is useful - please submit that.

Stefan

Patch

diff --git a/docs/tracing.txt b/docs/tracing.txt
index ea29f2c..ca5022a 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -9,7 +9,7 @@  for debugging, profiling, and observing execution.
 
 1. Build with the 'simple' trace backend:
 
-    ./configure --trace-backend=simple
+    ./configure --enable-trace-backend=simple
     make
 
 2. Create a file with the events you want to trace:
@@ -19,11 +19,19 @@  for debugging, profiling, and observing execution.
 
 3. Run the virtual machine to produce a trace file:
 
-    qemu -trace events=/tmp/events ... # your normal QEMU invocation
+    qemu-system-i386 -trace events=/tmp/events ... # your normal QEMU invocation
+
+   For example:   
+
+    qemu-system-i386 -trace events=/tmp/events -hda ./linux-0.2.img -kernel ./vmlinuz-2.6.35-22-generic -append "root=/dev/sda" -initrd ./initrd.img-2.6.35-22-generic 
+
+    where linux-0.2.img is the "dd" image containing the root filesystem, vmlinuz-* is the kernel file, and initrd-* is the initrd file.
 
 4. Pretty-print the binary trace file:
 
-    ./simpletrace.py trace-events trace-*
+    ./scripts/simpletrace.py trace-events trace-1958
+
+   where trace-1958 is one of the local files produced from earlier tracing in Step 3.
 
 == Trace events ==