aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2012-10-11 04:55:31 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2012-10-11 04:55:31 -0300
commit8ed1d2756d3347c2b021748d8c272ff650f57dd0 (patch)
treeaf8f50be8e69de7b4fce9d9ec8d8ef144acf3b08 /tcg/tcg.c
parent6b414d9fb86527118f3ddb81a1d1a684b3548a9d (diff)
parent121afa9e0c02617c2a774996512e4f85f3e93da8 (diff)
Merge commit '121afa9e0c02617c2a774996512e4f85f3e93da8' into upstream-merge
* commit '121afa9e0c02617c2a774996512e4f85f3e93da8': (85 commits) Revert "Add ability to disable build of all targets" cpu_physical_memory_write_rom() needs to do TB invalidates qemu-char: BUGFIX, don't call FD_ISSET with negative fd Revert 455aa1e08 and c3767ed0eb pc: Drop practically unused BOCHS BIOS debug ports add -machine mem-merge=on|off option Remove unused CONFIG_TCG_PASS_AREG0 and dead code target-mips: switch to AREG0 free mode target-sh4: switch to AREG0 free mode target-cris: Switch to AREG0 free mode target-cris: Avoid AREG0 for helpers target-microblaze: switch to AREG0 free mode target-arm: final conversion to AREG0 free mode target-arm: convert remaining helpers target-arm: convert void helpers target-unicore32: switch to AREG0 free mode target-m68k: avoid using cpu_single_env target-m68k: switch to AREG0 free mode target-lm32: switch to AREG0 free mode target-s390x: avoid cpu_single_env ... Conflicts: configure Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8386b70ab..a4e7f42c7 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2059,22 +2059,29 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
}
#endif
+#ifdef CONFIG_PROFILER
+ s->opt_time -= profile_getclock();
+#endif
+
#ifdef USE_TCG_OPTIMIZATIONS
gen_opparam_ptr =
tcg_optimize(s, gen_opc_ptr, gen_opparam_buf, tcg_op_defs);
#endif
#ifdef CONFIG_PROFILER
+ s->opt_time += profile_getclock();
s->la_time -= profile_getclock();
#endif
+
tcg_liveness_analysis(s);
+
#ifdef CONFIG_PROFILER
s->la_time += profile_getclock();
#endif
#ifdef DEBUG_DISAS
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) {
- qemu_log("OP after liveness analysis:\n");
+ qemu_log("OP after optimization and liveness analysis:\n");
tcg_dump_ops(s);
qemu_log("\n");
}
@@ -2241,6 +2248,9 @@ void tcg_dump_info(FILE *f, fprintf_function cpu_fprintf)
(double)s->interm_time / tot * 100.0);
cpu_fprintf(f, " gen_code time %0.1f%%\n",
(double)s->code_time / tot * 100.0);
+ cpu_fprintf(f, "optim./code time %0.1f%%\n",
+ (double)s->opt_time / (s->code_time ? s->code_time : 1)
+ * 100.0);
cpu_fprintf(f, "liveness/code time %0.1f%%\n",
(double)s->la_time / (s->code_time ? s->code_time : 1) * 100.0);
cpu_fprintf(f, "cpu_restore count %" PRId64 "\n",