diff options
| author | Max Filippov <jcmvbkbc@gmail.com> | 2014-11-02 11:04:18 +0300 |
|---|---|---|
| committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-12-17 05:49:32 +0300 |
| commit | 246ae24d7df47f05d7b102f9c84e00b536eadc43 (patch) | |
| tree | 6f0829b1a368a7bdd3ae40446a40ed83ca7f1edf /tcg/tcg.c | |
| parent | d86fb03469e016af4e54f04efccbc20a8afa3e19 (diff) | |
| download | focaccia-qemu-246ae24d7df47f05d7b102f9c84e00b536eadc43.tar.gz focaccia-qemu-246ae24d7df47f05d7b102f9c84e00b536eadc43.zip | |
tcg: add separate monitor command to dump opcode counters
Currently 'info jit' outputs half of the information to monitor and the rest to qemu log. Dumping opcode counts to monitor as a part of 'info jit' command doesn't sound useful. Add new monitor command 'info opcount' that only dumps opcode counters. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'tcg/tcg.c')
| -rw-r--r-- | tcg/tcg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c index 7a84b871fc..6ff8b51198 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2401,14 +2401,20 @@ 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) +void tcg_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]); } } +#else +void tcg_dump_op_count(FILE *f, fprintf_function cpu_fprintf) +{ + cpu_fprintf(f, "[TCG profiler not compiled]\n"); +} #endif @@ -2620,8 +2626,6 @@ void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf) s->restore_count); cpu_fprintf(f, " avg cycles %0.1f\n", s->restore_count ? (double)s->restore_time / s->restore_count : 0); - - dump_op_count(); } #else void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf) |