qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] how could I analysis the trace log?


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] how could I analysis the trace log?
Date: Mon, 13 Feb 2012 11:22:09 +0000

On Sun, Feb 12, 2012 at 4:32 AM, Wei Yang <address@hidden> wrote:
> After some run time, I run the script like:
> ./scripts/simpletrace.py qemu_trace_events_parse qemu_trace.log
>
> The qemu_trace_events_parse is :
> g_realloc(addr)
> g_malloc(addr)
>
> The output looks like:
> g_malloc 1.831 addr=0xb945d1f0
> g_malloc 2.498 addr=0xb945d1f0
> g_realloc 4.715 addr=0x10
> g_realloc 1.520 addr=0xc
> g_realloc 1.505 addr=0xc
>
> The steps I used is correct?

Yes, that's fine.  The output fields are trace event name, delta time
since last event (in microseconds), and arguments printed as hex
numbers.

> I just guess the format of input events file of the simpletrace.py.
> For so many available events, how could I specify the format of all
> those events?

simpletrace.py does not format events in a special way.  It simply
prints them all out as hex numbers.

If you want special formatting you should write a custom trace
analysis script.  It's pretty easy to do and you can find an example
here:

http://blog.vmsplice.net/2011/03/how-to-write-trace-analysis-scripts-for.html

If you looked at the simpletrace.py source code you may have noticed
that it is actually a Python module.  It provides an API so you can
process the trace events that you are interested in.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]