summaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2016-06-09 19:31:41 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2016-06-20 15:30:01 +0100
commit7c2550432abe62f53e6df878ceba6ceaf71f0e7e (patch)
treed9560c139a0e59672cc44578cec766dd45e64370 /target-cris
parent5edbd4e30426d3a0d712510b2509a521e35192b1 (diff)
downloadqemu-7c2550432abe62f53e6df878ceba6ceaf71f0e7e.tar.gz
exec: [tcg] Track which vCPU is performing translation and execution
Information is tracked inside the TCGContext structure, and later used by tracing events with the 'tcg' and 'vcpu' properties. The 'cpu' field is used to check tracing of translation-time events ("*_trans"). The 'tcg_env' field is used to pass it to execution-time events ("*_exec"). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 146549350162.18437.3033661139638458143.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/translate.c1
-rw-r--r--target-cris/translate_v10.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c
index cc515690e1..f4a8d7d000 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -3374,6 +3374,7 @@ void cris_initialize_tcg(void)
int i;
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
+ tcg_ctx.tcg_env = cpu_env;
cc_x = tcg_global_mem_new(cpu_env,
offsetof(CPUCRISState, cc_x), "cc_x");
cc_src = tcg_global_mem_new(cpu_env,
diff --git a/target-cris/translate_v10.c b/target-cris/translate_v10.c
index 06ba1ef86a..4707a18e77 100644
--- a/target-cris/translate_v10.c
+++ b/target-cris/translate_v10.c
@@ -1250,6 +1250,7 @@ void cris_initialize_crisv10_tcg(void)
int i;
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
+ tcg_ctx.tcg_env = cpu_env;
cc_x = tcg_global_mem_new(cpu_env,
offsetof(CPUCRISState, cc_x), "cc_x");
cc_src = tcg_global_mem_new(cpu_env,