summaryrefslogtreecommitdiff
path: root/cpu-common.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-10-28 06:41:57 +0100
committerPeter Maydell <peter.maydell@linaro.org>2025-10-31 16:26:45 +0000
commit65e438d9ea3b2c5fdbf3a2255e95d73887d15e74 (patch)
tree1c1c3b7acb4ecfe25a3f3d392898a77b3545455b /cpu-common.c
parent93ac765076a4adf676974353c542a9c2f02d3d10 (diff)
downloadqemu-65e438d9ea3b2c5fdbf3a2255e95d73887d15e74.tar.gz
qemu-65e438d9ea3b2c5fdbf3a2255e95d73887d15e74.zip
cpus: Trace cpu_exec_start() and cpu_exec_end() calls
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpu-common.c')
-rw-r--r--cpu-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpu-common.c b/cpu-common.c
index 0eb5c7b8f2..988d057d84 100644
--- a/cpu-common.c
+++ b/cpu-common.c
@@ -249,6 +249,8 @@ void end_exclusive(void)
/* Wait for exclusive ops to finish, and begin cpu execution. */
void cpu_exec_start(CPUState *cpu)
{
+ trace_cpu_exec_start(cpu->cpu_index);
+
qatomic_set(&cpu->running, true);
/* Write cpu->running before reading pending_cpus. */
@@ -319,6 +321,7 @@ void cpu_exec_end(CPUState *cpu)
}
}
}
+ trace_cpu_exec_end(cpu->cpu_index);
}
void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func,