]> git.ipfire.org Git - thirdparty/qemu.git/commit
qom/cpu: Simplify how CPUClass::dump_statistics() prints
authorMarkus Armbruster <armbru@redhat.com>
Wed, 17 Apr 2019 19:18:00 +0000 (21:18 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 18 Apr 2019 20:18:59 +0000 (22:18 +0200)
commit11cb6c152a52fdda6a7f5a8bb271344aaf0c2b98
tree40fc2a77e515f2cb6f55bdf50305b1befeee6ad6
parentd3fd9e4b79f77afea17213a7b32ba9eda7fc59c1
qom/cpu: Simplify how CPUClass::dump_statistics() prints

CPUClass method dump_statistics() takes an fprintf()-like callback and
a FILE * to pass to it.

Its only caller hmp_info_cpustats() (via cpu_dump_statistics()) 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-13-armbru@redhat.com>
include/qom/cpu.h
monitor.c
qom/cpu.c
target/ppc/cpu.h
target/ppc/translate.c