]> git.proxmox.com Git - mirror_qemu.git/blobdiff - cpus.c
tcg: distribute tcg_time into TCG contexts
[mirror_qemu.git] / cpus.c
diff --git a/cpus.c b/cpus.c
index 361678e45943c2b2e2825071a569a5697ec708ee..cce64874e62358a760e208d2b2d4d8e8b51e17fd 100644 (file)
--- a/cpus.c
+++ b/cpus.c
@@ -1425,7 +1425,8 @@ static int tcg_cpu_exec(CPUState *cpu)
     ret = cpu_exec(cpu);
     cpu_exec_end(cpu);
 #ifdef CONFIG_PROFILER
-    tcg_time += profile_getclock() - ti;
+    atomic_set(&tcg_ctx->prof.cpu_exec_time,
+               tcg_ctx->prof.cpu_exec_time + profile_getclock() - ti);
 #endif
     return ret;
 }