qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PULL 02/11] tcg: dump op count into qemu log


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 02/11] tcg: dump op count into qemu log
Date: Sun, 24 Aug 2014 17:30:53 +0400

From: zhanghailiang <address@hidden>

fopen() may fail and it does not check its return vaule here,
it is better to dump op count to the normal log file.

Signed-off-by: Li Liu <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 tcg/tcg.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index c068990..7a84b87 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2404,12 +2404,10 @@ static int64_t tcg_table_op_count[NB_OPS];
 static void dump_op_count(void)
 {
     int i;
-    FILE *f;
-    f = fopen("/tmp/op.log", "w");
+
     for(i = INDEX_op_end; i < NB_OPS; i++) {
-        fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name, 
tcg_table_op_count[i]);
+        qemu_log("%s %" PRId64 "\n", tcg_op_defs[i].name, 
tcg_table_op_count[i]);
     }
-    fclose(f);
 }
 #endif
 
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]