diff options
author | Max Filippov | 2014-11-02 09:04:18 +0100 |
---|---|---|
committer | Max Filippov | 2014-12-17 03:49:32 +0100 |
commit | 246ae24d7df47f05d7b102f9c84e00b536eadc43 (patch) | |
tree | 6f0829b1a368a7bdd3ae40446a40ed83ca7f1edf /tcg | |
parent | Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20141216-1' into ... (diff) | |
download | qemu-246ae24d7df47f05d7b102f9c84e00b536eadc43.tar.gz qemu-246ae24d7df47f05d7b102f9c84e00b536eadc43.tar.xz 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')
-rw-r--r-- | tcg/tcg.c | 12 | ||||
-rw-r--r-- | tcg/tcg.h | 1 |
2 files changed, 9 insertions, 4 deletions
@@ -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) @@ -610,6 +610,7 @@ int tcg_check_temp_count(void); #endif void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf); +void tcg_dump_op_count(FILE *f, fprintf_function cpu_fprintf); #define TCG_CT_ALIAS 0x80 #define TCG_CT_IALIAS 0x40 |