qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tcg: dump op count to the same stream as other info
@ 2014-11-02  8:07 Max Filippov
  2014-11-02 19:53 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Max Filippov @ 2014-11-02  8:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Max Filippov, Richard Henderson

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(-)

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)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg: dump op count to the same stream as other info
  2014-11-02  8:07 [Qemu-devel] [PATCH] tcg: dump op count to the same stream as other info Max Filippov
@ 2014-11-02 19:53 ` Richard Henderson
  2014-11-02 19:56   ` Max Filippov
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2014-11-02 19:53 UTC (permalink / raw)
  To: Max Filippov, qemu-devel

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~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg: dump op count to the same stream as other info
  2014-11-02 19:53 ` Richard Henderson
@ 2014-11-02 19:56   ` Max Filippov
  2014-11-02 20:00     ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Max Filippov @ 2014-11-02 19:56 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

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?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg: dump op count to the same stream as other info
  2014-11-02 19:56   ` Max Filippov
@ 2014-11-02 20:00     ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2014-11-02 20:00 UTC (permalink / raw)
  To: Max Filippov; +Cc: qemu-devel

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~

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-02 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02  8:07 [Qemu-devel] [PATCH] tcg: dump op count to the same stream as other info Max Filippov
2014-11-02 19:53 ` Richard Henderson
2014-11-02 19:56   ` Max Filippov
2014-11-02 20:00     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).