mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
bc5008a832
commit
d70724cec8
1 changed files with 2 additions and 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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue