diff mbox

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

Message ID 1414915640-9543-1-git-send-email-jcmvbkbc@gmail.com
State New
Headers show

Commit Message

Max Filippov Nov. 2, 2014, 8:07 a.m. UTC
Otherwise 'info jit' outputs half of the information to monitor and the
rest to qemu log.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 tcg/tcg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Richard Henderson Nov. 2, 2014, 7:53 p.m. UTC | #1
On 11/02/2014 01:07 AM, Max Filippov wrote:
> Otherwise 'info jit' outputs half of the information to monitor and the
> rest to qemu log.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  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~
Max Filippov Nov. 2, 2014, 7:56 p.m. UTC | #2
On Sun, Nov 2, 2014 at 10:53 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 11/02/2014 01:07 AM, Max Filippov wrote:
>> Otherwise 'info jit' outputs half of the information to monitor and the
>> rest to qemu log.
>>
>> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
>> ---
>>  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?
Richard Henderson Nov. 2, 2014, 8 p.m. UTC | #3
On 11/02/2014 11:56 AM, Max Filippov wrote:
>> 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~
diff mbox

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 7a84b87..15d29df 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -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)