diff options
author | Lluís Vilanova <vilanova@ac.upc.edu> | 2016-06-09 19:31:41 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-06-20 15:30:01 +0100 |
commit | 7c2550432abe62f53e6df878ceba6ceaf71f0e7e (patch) | |
tree | d9560c139a0e59672cc44578cec766dd45e64370 /translate-all.c | |
parent | 5edbd4e30426d3a0d712510b2509a521e35192b1 (diff) | |
download | qemu-7c2550432abe62f53e6df878ceba6ceaf71f0e7e.zip qemu-7c2550432abe62f53e6df878ceba6ceaf71f0e7e.tar.gz qemu-7c2550432abe62f53e6df878ceba6ceaf71f0e7e.tar.bz2 |
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 'translate-all.c')
-rw-r--r-- | translate-all.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/translate-all.c b/translate-all.c index 3f402df..eaa95e4 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1182,7 +1182,9 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tcg_func_start(&tcg_ctx); + tcg_ctx.cpu = ENV_GET_CPU(env); gen_intermediate_code(env, tb); + tcg_ctx.cpu = NULL; trace_translate_block(tb, tb->pc, tb->tc_ptr); |