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 16:31:41 +0000

On Mon, Feb 13, 2012 at 3:12 PM, Andreas Färber <address@hidden> wrote:
> Hi,
>
> Am 12.02.2012 05:32, schrieb Wei Yang:
>> I enable the trace function with --enable-trace-backend=simple and I
>> create the event file like this
>> g_realloc
>> g_malloc
>>
>> Then I start the qemu with following command.
>> ./i386-softmmu/qemu-system-i386 -enable-kvm -drive
>> file=../../kvm/ubuntu.img -boot dc -m 512 -usb
>>  -monitor stdio -trace events=qemu_trace_events,file=qemu_trace.log
>>
>> 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?
>
> Not quite. IIRC you need to pass in path/to/qemu/trace-events with the
> full list of events you were using at the time of tracing (trace file
> uses index of event). That file also contains a format string from which
> you can infer what the arguments mean.

Right:

$ scripts/simpletrace.py trace-events trace-12345



reply via email to

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