From: zhanghailiang Date: Mon, 18 Aug 2014 07:58:08 +0000 (+0800) Subject: tcg: dump op count into qemu log X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d70724cec84ff99ffc7f70dd567466acf228b389;p=qemu.git tcg: dump op count into qemu log 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 Signed-off-by: zhanghailiang Signed-off-by: Michael Tokarev --- diff --git a/tcg/tcg.c b/tcg/tcg.c index c068990fd5..7a84b871fc 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