]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg: dump op count into qemu log
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Mon, 18 Aug 2014 07:58:08 +0000 (15:58 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 24 Aug 2014 09:16:32 +0000 (13:16 +0400)
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 <john.liuli@huawei.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tcg/tcg.c

index c068990fd5173a8a86a0d78e23d9f92d1566247e..7a84b871fc59c5ef83e0b884557c22b2cc9e0d7d 100644 (file)
--- 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