diff options
author | zhanghailiang <zhang.zhanghailiang@huawei.com> | 2014-08-18 15:58:08 +0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-08-24 13:16:32 +0400 |
commit | d70724cec84ff99ffc7f70dd567466acf228b389 (patch) | |
tree | 54eda0b2fe507a21bd348d41a15e87cdfc1a11bc /tcg | |
parent | bc5008a832f95aae86efce844382e64d54da2146 (diff) | |
download | qemu-d70724cec84ff99ffc7f70dd567466acf228b389.zip qemu-d70724cec84ff99ffc7f70dd567466acf228b389.tar.gz qemu-d70724cec84ff99ffc7f70dd567466acf228b389.tar.bz2 |
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 <john.liuli@huawei.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |