summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-09-11 20:22:05 +0000
committerAvi Kivity <avi@redhat.com>2011-10-02 16:27:13 +0200
commit314e298735903035ba2b7b0f3cf39981f4171546 (patch)
tree51a57705a5d1eaab97529863de5f5d40b9483294 /monitor.c
parent3917149d96cfa5f619de770af6059f37b6e1df77 (diff)
downloadqemu-314e298735903035ba2b7b0f3cf39981f4171546.tar.gz
memory: simple memory tree printer
Add a monitor command 'info mtree' to show the memory hierarchy much like /proc/iomem in Linux. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 8ec2c5efea..d323ea5851 100644
--- a/monitor.c
+++ b/monitor.c
@@ -63,6 +63,7 @@
#endif
#include "trace/control.h"
#include "ui/qemu-spice.h"
+#include "memory.h"
//#define DEBUG
//#define DEBUG_COMPLETION
@@ -2470,6 +2471,11 @@ static void tlb_info(Monitor *mon)
}
#endif
+static void do_info_mtree(Monitor *mon)
+{
+ mtree_info((fprintf_function)monitor_printf, mon);
+}
+
static void do_info_kvm_print(Monitor *mon, const QObject *data)
{
QDict *qdict;
@@ -2978,6 +2984,13 @@ static const mon_cmd_t info_cmds[] = {
},
#endif
{
+ .name = "mtree",
+ .args_type = "",
+ .params = "",
+ .help = "show memory tree",
+ .mhandler.info = do_info_mtree,
+ },
+ {
.name = "jit",
.args_type = "",
.params = "",