aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-17 21:17:56 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-18 22:18:59 +0200
commitb6b71cb5c674a97a4cd935349ce8a2764f720af4 (patch)
treee19df340f498ea7caa5bf81c756c02109042258b /include/exec
parente1ce7d747bc071f86a77683b433b852001163c2c (diff)
downloadqemu-b6b71cb5c674a97a4cd935349ce8a2764f720af4.zip
qemu-b6b71cb5c674a97a4cd935349ce8a2764f720af4.tar.gz
qemu-b6b71cb5c674a97a4cd935349ce8a2764f720af4.tar.bz2
memory: Clean up how mtree_info() prints
mtree_info() takes an fprintf()-like callback and a FILE * to pass to it, and so do its helper functions. Passing around callback and argument is rather tiresome. Its only caller hmp_info_mtree() passes monitor_printf() cast to fprintf_function and the current monitor cast to FILE *. The type-punning is technically undefined behaviour, but works in practice. Clean up: drop the callback, and call qemu_printf() instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190417191805.28198-9-armbru@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memory-internal.h3
-rw-r--r--include/exec/memory.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
index bb08fa4..d1a9dd1 100644
--- a/include/exec/memory-internal.h
+++ b/include/exec/memory-internal.h
@@ -45,8 +45,7 @@ AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv);
void address_space_dispatch_compact(AddressSpaceDispatch *d);
void address_space_dispatch_free(AddressSpaceDispatch *d);
-void mtree_print_dispatch(fprintf_function mon, void *f,
- struct AddressSpaceDispatch *d,
+void mtree_print_dispatch(struct AddressSpaceDispatch *d,
MemoryRegion *root);
struct page_collection;
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 1625913..9144a47 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1720,8 +1720,7 @@ void memory_global_dirty_log_start(void);
*/
void memory_global_dirty_log_stop(void);
-void mtree_info(fprintf_function mon_printf, void *f, bool flatview,
- bool dispatch_tree, bool owner);
+void mtree_info(bool flatview, bool dispatch_tree, bool owner);
/**
* memory_region_dispatch_read: perform a read directly to the specified