aboutsummaryrefslogtreecommitdiff
path: root/osdep.h
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2012-08-02 15:44:16 -0400
committerAnthony Liguori <aliguori@us.ibm.com>2012-08-16 13:41:15 -0500
commitddb97f1debbb6be8d871f3b565f7b8befebf0f4f (patch)
treea81ce727e2c5f9d058d156b0754bdbaaafd00d25 /osdep.h
parent3c4a4d0dcbf4269e125f92df06816db1c1e86d20 (diff)
downloadqemu-ddb97f1debbb6be8d871f3b565f7b8befebf0f4f.zip
qemu-ddb97f1debbb6be8d871f3b565f7b8befebf0f4f.tar.gz
qemu-ddb97f1debbb6be8d871f3b565f7b8befebf0f4f.tar.bz2
memory: add -machine dump-guest-core=on|off
Add a new '[,dump-guest-core=on|off]' option to the '-machine' option. When 'dump-guest-core=off' is specified, guest memory is omitted from the core dump. The default behavior continues to be to include guest memory when a core dump is triggered. In my testing, this brought the core dump size down from 384MB to 6MB on a 2GB guest. Is anything additional required to preserve this setting for migration or savevm? I don't believe so. Changelog: v3: Eliminate globals as per Anthony's suggestion set no dump from qemu_ram_remap() as well v2: move the option from -m to -machine, rename option dump -> dump-guest-core Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'osdep.h')
-rw-r--r--osdep.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/osdep.h b/osdep.h
index d4b887d..cb213e0 100644
--- a/osdep.h
+++ b/osdep.h
@@ -103,6 +103,11 @@ void qemu_vfree(void *ptr);
#else
#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID
#endif
+#ifdef MADV_DONTDUMP
+#define QEMU_MADV_DONTDUMP MADV_DONTDUMP
+#else
+#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
+#endif
#elif defined(CONFIG_POSIX_MADVISE)
@@ -110,6 +115,7 @@ void qemu_vfree(void *ptr);
#define QEMU_MADV_DONTNEED POSIX_MADV_DONTNEED
#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID
#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID
+#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
#else /* no-op */
@@ -117,6 +123,7 @@ void qemu_vfree(void *ptr);
#define QEMU_MADV_DONTNEED QEMU_MADV_INVALID
#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID
#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID
+#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
#endif