[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/10] Add printf debug to savevm
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 03/10] Add printf debug to savevm |
Date: |
Tue, 30 Nov 2010 10:36:00 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Nov 29, 2010 at 08:00:18PM -0600, Anthony Liguori wrote:
> Yeah, all of this should be done via tracing. Maybe Stefan can make
> some suggestions.
Here is an example of how to record savevm timestamps using tracing.
Actually the timestamp is recorded automatically when a trace event
fires.
Add these to the trace-events file:
savevm_start(void) ""
savevm_stop(unsigned int section_id) "section_id %u"
Then use trace_savevm_start() instead of START_SAVEVM_CLOCK() and
trace_savevm_stop() instead of STOP_SAVEVM_CLOCK() in savevm.c. Also
#include "trace.h".
All the macros and inline timestamp analysis can be removed from
savevm.c.
./configure --trace-backend=simple [...]
make
After running savevm look for the trace-<pid> file that QEMU produces in
its current working directory. You can pretty-print it like this:
./simpletrace.py trace-events trace-<pid>
The second field in the simpletrace.py output is the time delta (in
microseconds) since the last trace event. So you can easily see how
long start->stop took.
For more info see docs/tracing.txt. You might prefer to use SystemTap
(./configure --trace-backend=dtrace) so you can write stap scripts to do
more powerful analysis.
Stefan
- Re: [Qemu-devel] [PATCH 03/10] Add printf debug to savevm,
Stefan Hajnoczi <=