From 7c2550432abe62f53e6df878ceba6ceaf71f0e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Thu, 9 Jun 2016 19:31:41 +0200 Subject: exec: [tcg] Track which vCPU is performing translation and execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 146549350162.18437.3033661139638458143.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi --- translate-all.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'translate-all.c') diff --git a/translate-all.c b/translate-all.c index 3f402dfe04..eaa95e4cd7 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); -- cgit v1.2.3