summaryrefslogtreecommitdiff
path: root/translate-all.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-23 09:57:34 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-23 09:57:34 +0000
commitb67d9a52d4720ef56d4fc494538e98e9a1ef5717 (patch)
tree9fc9b755e035487331fc106662f9aee67d8c7972 /translate-all.c
parenta23a9ec615e160c9ac008f27d554a79255ca27b0 (diff)
downloadqemu-b67d9a52d4720ef56d4fc494538e98e9a1ef5717.tar.gz
qemu-b67d9a52d4720ef56d4fc494538e98e9a1ef5717.tar.bz2
qemu-b67d9a52d4720ef56d4fc494538e98e9a1ef5717.zip
TCG profiler clean up
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4538 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'translate-all.c')
-rw-r--r--translate-all.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/translate-all.c b/translate-all.c
index e0479a8150..8b8b6a2813 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -48,21 +48,6 @@ target_ulong gen_opc_jump_pc[2];
uint32_t gen_opc_hflags[OPC_BUF_SIZE];
#endif
-#ifdef CONFIG_PROFILER
-int64_t dyngen_tb_count1;
-int64_t dyngen_tb_count;
-int64_t dyngen_op_count;
-int64_t dyngen_old_op_count;
-int64_t dyngen_tcg_del_op_count;
-int dyngen_op_count_max;
-int64_t dyngen_code_in_len;
-int64_t dyngen_code_out_len;
-int64_t dyngen_interm_time;
-int64_t dyngen_code_time;
-int64_t dyngen_restore_count;
-int64_t dyngen_restore_time;
-#endif
-
/* XXX: suppress that */
unsigned long code_gen_max_block_size(void)
{
@@ -102,8 +87,8 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
#endif
#ifdef CONFIG_PROFILER
- dyngen_tb_count1++; /* includes aborted translations because of
- exceptions */
+ s->tb_count1++; /* includes aborted translations because of
+ exceptions */
ti = profile_getclock();
#endif
tcg_func_start(s);
@@ -129,16 +114,16 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
#endif
#ifdef CONFIG_PROFILER
- dyngen_tb_count++;
- dyngen_interm_time += profile_getclock() - ti;
- dyngen_code_time -= profile_getclock();
+ s->tb_count++;
+ s->interm_time += profile_getclock() - ti;
+ s->code_time -= profile_getclock();
#endif
gen_code_size = dyngen_code(s, gen_code_buf);
*gen_code_size_ptr = gen_code_size;
#ifdef CONFIG_PROFILER
- dyngen_code_time += profile_getclock();
- dyngen_code_in_len += tb->size;
- dyngen_code_out_len += gen_code_size;
+ s->code_time += profile_getclock();
+ s->code_in_len += tb->size;
+ s->code_out_len += gen_code_size;
#endif
#ifdef DEBUG_DISAS
@@ -196,8 +181,8 @@ int cpu_restore_state(TranslationBlock *tb,
gen_pc_load(env, tb, searched_pc, j, puc);
#ifdef CONFIG_PROFILER
- dyngen_restore_time += profile_getclock() - ti;
- dyngen_restore_count++;
+ s->restore_time += profile_getclock() - ti;
+ s->restore_count++;
#endif
return 0;
}