summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-17 21:17:54 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-18 22:18:59 +0200
commitac7ff4cf5f20eee8cec228209f6b3ca557c60639 (patch)
tree88938d9d560afb4c6bf5c65d7ee925803e6198d1 /include
parent76c8661595fa9414fabf8a164b9adfc93c8a65e2 (diff)
downloadfocaccia-qemu-ac7ff4cf5f20eee8cec228209f6b3ca557c60639.tar.gz
focaccia-qemu-ac7ff4cf5f20eee8cec228209f6b3ca557c60639.zip
qsp: Simplify how qsp_report() prints
qsp_report() takes an fprintf()-like callback and a FILE * to pass to
it.

Its only caller hmp_sync_profile() passes monitor_fprintf() and the
current monitor cast to FILE *.  monitor_fprintf() casts it right
back, and is otherwise identical to monitor_printf().  The
type-punning is ugly.

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-7-armbru@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/qapi.h1
-rw-r--r--include/qemu/qsp.h6
2 files changed, 3 insertions, 4 deletions
diff --git a/include/block/qapi.h b/include/block/qapi.h
index 83bdb098bd..a891f43b9c 100644
--- a/include/block/qapi.h
+++ b/include/block/qapi.h
@@ -27,6 +27,7 @@
 
 #include "block/block.h"
 #include "block/snapshot.h"
+#include "qemu/fprintf-fn.h"
 
 BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
                                         BlockDriverState *bs, Error **errp);
diff --git a/include/qemu/qsp.h b/include/qemu/qsp.h
index a94c464f90..bf36aabfa8 100644
--- a/include/qemu/qsp.h
+++ b/include/qemu/qsp.h
@@ -11,15 +11,13 @@
 #ifndef QEMU_QSP_H
 #define QEMU_QSP_H
 
-#include "qemu/fprintf-fn.h"
-
 enum QSPSortBy {
     QSP_SORT_BY_TOTAL_WAIT_TIME,
     QSP_SORT_BY_AVG_WAIT_TIME,
 };
 
-void qsp_report(FILE *f, fprintf_function cpu_fprintf, size_t max,
-                enum QSPSortBy sort_by, bool callsite_coalesce);
+void qsp_report(size_t max, enum QSPSortBy sort_by,
+                bool callsite_coalesce);
 
 bool qsp_is_enabled(void);
 void qsp_enable(void);