mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
3917149d96
commit
314e298735
3 changed files with 106 additions and 0 deletions
13
monitor.c
13
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;
|
||||
|
@ -2977,6 +2983,13 @@ static const mon_cmd_t info_cmds[] = {
|
|||
.mhandler.info = mem_info,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "mtree",
|
||||
.args_type = "",
|
||||
.params = "",
|
||||
.help = "show memory tree",
|
||||
.mhandler.info = do_info_mtree,
|
||||
},
|
||||
{
|
||||
.name = "jit",
|
||||
.args_type = "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue