Skip to contentSkip to conversation

tcg: dump op count to the same stream as other info

PATCH In review Max Filippov 2 participants 4 messages Nov 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg: dump op count to the same stream as other info

Otherwise 'info jit' outputs half of the information to monitor and the rest to qemu log.

---
 tcg/tcg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
tcg/tcg.c +4 -3
index 7a84b87..15d29df 100644
@@ -2401,12 +2401,13 @@ static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def,
 
 static int64_t tcg_table_op_count[NB_OPS];
 
-static void dump_op_count(void)
+static void dump_op_count(FILE *f, fprintf_function cpu_fprintf)
 {
     int i;
 
     for(i = INDEX_op_end; i < NB_OPS; i++) {
-        qemu_log("%s %" PRId64 "\n", tcg_op_defs[i].name, tcg_table_op_count[i]);
+        cpu_fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name,
+                    tcg_table_op_count[i]);
     }
 }
 #endif
@@ -2621,7 +2622,7 @@ void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf)
     cpu_fprintf(f, "  avg cycles        %0.1f\n",
                 s->restore_count ? (double)s->restore_time / s->restore_count : 0);
 
-    dump_op_count();
+    dump_op_count(f, cpu_fprintf);
 }
 #else
 void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf)
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 7 lines · Max Filippov

Otherwise 'info jit' outputs half of the information to monitor and the rest to qemu log.

---
 tcg/tcg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Well, yes, but do you really want 60+ lines of per-opcode use counts on the monitor? I'm pretty sure I would never find that useful...

r~

#2 lore raw
Quoted 11 lines · Richard Henderson
Quoted 7 lines · Max Filippov

Otherwise 'info jit' outputs half of the information to monitor and the rest to qemu log.

---
 tcg/tcg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Well, yes, but do you really want 60+ lines of per-opcode use counts on the monitor? I'm pretty sure I would never find that useful...

Maybe that dump should be a part of another command then?

Signature · 2 lines
Thanks.
-- Max
#3 lore raw
Quoted 4 lines · Max Filippov
Quoted 2 lines

Well, yes, but do you really want 60+ lines of per-opcode use counts on the monitor? I'm pretty sure I would never find that useful...

Maybe that dump should be a part of another command then?

I'd be happy with that.

r~