[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 03/10] Add printf debug to savevm
From: |
Juan Quintela |
Subject: |
[Qemu-devel] Re: [PATCH 03/10] Add printf debug to savevm |
Date: |
Tue, 30 Nov 2010 23:40:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Stefan Hajnoczi <address@hidden> wrote:
> 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.
Thanks.
Searching for guru, I basically want to only print the values when the
difference is bigger that some values (number of calls is really big, I
need to learn how to script the analisys).
But clearly this "have to be" easier than change printf's and ifs and
rerun the test.
Later, Juan.
> Stefan
[Qemu-devel] [PATCH 01/10] Add spent time to migration, Juan Quintela, 2010/11/23
[Qemu-devel] [PATCH 04/10] No need to iterate if we already are over the limit, Juan Quintela, 2010/11/23
[Qemu-devel] [PATCH 05/10] KVM don't care about TLB handling, Juan Quintela, 2010/11/23
[Qemu-devel] [PATCH 03/10] Add printf debug to savevm, Juan Quintela, 2010/11/23
- Message not available
- Message not available
- [Qemu-devel] Re: [PATCH 03/10] Add printf debug to savevm,
Juan Quintela <=
[Qemu-devel] [PATCH 06/10] Only calculate expected_time for stage 2, Juan Quintela, 2010/11/23
[Qemu-devel] [PATCH 07/10] ram_save_remaining() returns an uint64_t, Juan Quintela, 2010/11/23
- Message not available
- Message not available
[Qemu-devel] [PATCH 08/10] Count nanoseconds with uint64_t not doubles, Juan Quintela, 2010/11/23
[Qemu-devel] [PATCH 09/10] Exit loop if we have been there too long, Juan Quintela, 2010/11/23