From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: owasserm@redhat.com, vinodchegu@gmail.com
Subject: [Qemu-devel] [PATCH 2/8] Add tracepoints for savevm section start/end
Date: Fri, 22 Jun 2012 15:46:13 +0200 [thread overview]
Message-ID: <2b03d8f73e1d039347e6cadc8e8ef517ef46fe05.1340371865.git.quintela@redhat.com> (raw)
In-Reply-To: <cover.1340371865.git.quintela@redhat.com>
In-Reply-To: <cover.1340371865.git.quintela@redhat.com>
This allows to know how long each section takes to save.
An awk script like this tells us sections that takes more that 10ms
$1 ~ /savevm_state_iterate_end/ {
/* Print savevm_section_end line when > 10ms duration */
if ($2 > 10000) {
printf("%s times_missing=%u\n", $0, times_missing++);
}
}
Signed-off-by: Juan Quintela <quintela@redhat.com>
fix ws tracepoints
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
savevm.c | 8 ++++++++
trace-events | 5 +++++
2 files changed, 13 insertions(+)
diff --git a/savevm.c b/savevm.c
index faa8145..40320be 100644
--- a/savevm.c
+++ b/savevm.c
@@ -85,6 +85,7 @@
#include "cpus.h"
#include "memory.h"
#include "qmp-commands.h"
+#include "trace.h"
#define SELF_ANNOUNCE_ROUNDS 5
@@ -1624,11 +1625,14 @@ int qemu_savevm_state_iterate(QEMUFile *f)
if (se->save_live_state == NULL)
continue;
+ trace_savevm_section_start();
/* Section type */
qemu_put_byte(f, QEMU_VM_SECTION_PART);
qemu_put_be32(f, se->section_id);
ret = se->save_live_state(f, QEMU_VM_SECTION_PART, se->opaque);
+ trace_savevm_section_end(se->section_id);
+
if (ret <= 0) {
/* Do not proceed to the next vmstate before this one reported
completion of the current stage. This serializes the migration
@@ -1658,11 +1662,13 @@ int qemu_savevm_state_complete(QEMUFile *f)
if (se->save_live_state == NULL)
continue;
+ trace_savevm_section_start();
/* Section type */
qemu_put_byte(f, QEMU_VM_SECTION_END);
qemu_put_be32(f, se->section_id);
ret = se->save_live_state(f, QEMU_VM_SECTION_END, se->opaque);
+ trace_savevm_section_end(se->section_id);
if (ret < 0) {
return ret;
}
@@ -1674,6 +1680,7 @@ int qemu_savevm_state_complete(QEMUFile *f)
if (se->save_state == NULL && se->vmsd == NULL)
continue;
+ trace_savevm_section_start();
/* Section type */
qemu_put_byte(f, QEMU_VM_SECTION_FULL);
qemu_put_be32(f, se->section_id);
@@ -1687,6 +1694,7 @@ int qemu_savevm_state_complete(QEMUFile *f)
qemu_put_be32(f, se->version_id);
vmstate_save(f, se);
+ trace_savevm_section_end(se->section_id);
}
qemu_put_byte(f, QEMU_VM_EOF);
diff --git a/trace-events b/trace-events
index 5c82b3a..82c7619 100644
--- a/trace-events
+++ b/trace-events
@@ -782,6 +782,11 @@ displaysurface_resize(void *display_state, void *display_surface, int width, int
# vga.c
ppm_save(const char *filename, void *display_surface) "%s surface=%p"
+# savevm.c
+
+savevm_section_start(void) ""
+savevm_section_end(unsigned int section_id) "section_id %u"
+
# hw/qxl.c
disable qxl_interface_set_mm_time(int qid, uint32_t mm_time) "%d %d"
disable qxl_io_write_vga(int qid, const char *mode, uint32_t addr, uint32_t val) "%d %s addr=%u val=%u"
--
1.7.10.2
next prev parent reply other threads:[~2012-06-22 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 13:46 [Qemu-devel] [PATCH v3 0/8] Huge memory fixes Juan Quintela
2012-06-22 13:46 ` [Qemu-devel] [PATCH 1/8] Add spent time for migration Juan Quintela
2012-06-22 13:46 ` Juan Quintela [this message]
2012-06-22 13:46 ` [Qemu-devel] [PATCH 3/8] No need to iterate if we already are over the limit Juan Quintela
2012-06-22 13:46 ` [Qemu-devel] [PATCH 4/8] Only TCG needs TLB handling Juan Quintela
2012-06-22 13:46 ` [Qemu-devel] [PATCH 5/8] Only calculate expected_time for stage 2 Juan Quintela
2012-06-22 13:46 ` [Qemu-devel] [PATCH 6/8] Exit loop if we have been there too long Juan Quintela
2012-06-22 13:46 ` [Qemu-devel] [PATCH 7/8] dirty bitmap: abstract its use Juan Quintela
2012-06-22 13:46 ` [Qemu-devel] [PATCH 8/8] Maintain the number of dirty pages Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2b03d8f73e1d039347e6cadc8e8ef517ef46fe05.1340371865.git.quintela@redhat.com \
--to=quintela@redhat.com \
--cc=owasserm@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vinodchegu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).