summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRichard Henderson2016-06-24 04:15:55 +0200
committerRichard Henderson2016-08-05 18:14:40 +0200
commitbdfb460ef77500f7b186759b585f06ff2120929d (patch)
tree0dad5b3169d975054658d146eb0ffa2fe0454607 /util
parenttcg: Compress dead_temps and mem_temps into a single array (diff)
downloadqemu-bdfb460ef77500f7b186759b585f06ff2120929d.tar.gz
qemu-bdfb460ef77500f7b186759b585f06ff2120929d.tar.xz
qemu-bdfb460ef77500f7b186759b585f06ff2120929d.zip
tcg: Include liveness info in the dumps
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'util')
-rw-r--r--util/log.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/util/log.c b/util/log.c
index b6c75b1102..9f0844481c 100644
--- a/util/log.c
+++ b/util/log.c
@@ -32,15 +32,22 @@ int qemu_loglevel;
static int log_append = 0;
static GArray *debug_regions;
-void qemu_log(const char *fmt, ...)
+/* Return the number of characters emitted. */
+int qemu_log(const char *fmt, ...)
{
- va_list ap;
-
- va_start(ap, fmt);
+ int ret = 0;
if (qemu_logfile) {
- vfprintf(qemu_logfile, fmt, ap);
+ va_list ap;
+ va_start(ap, fmt);
+ ret = vfprintf(qemu_logfile, fmt, ap);
+ va_end(ap);
+
+ /* Don't pass back error results. */
+ if (ret < 0) {
+ ret = 0;
+ }
}
- va_end(ap);
+ return ret;
}
static bool log_uses_own_buffers;