*/
#include "qemu/osdep.h"
+#include "qemu/lockable.h"
#include "cpu.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
#include "trace/control.h"
{
bitmap_copy(vcpu->trace_dstate, vcpu->trace_dstate_delayed,
CPU_TRACE_DSTATE_MAX_EVENTS);
- cpu_tb_jmp_cache_clear(vcpu);
+ tcg_flush_jmp_cache(vcpu);
}
void trace_event_set_vcpu_state_dynamic(CPUState *vcpu,
static bool adding_first_cpu(void)
{
- bool res;
- cpu_list_lock();
- res = adding_first_cpu1();
- cpu_list_unlock();
- return res;
+ QEMU_LOCK_GUARD(&qemu_cpu_list_lock);
+
+ return adding_first_cpu1();
}
void trace_init_vcpu(CPUState *vcpu)
{
TraceEventIter iter;
TraceEvent *ev;
- trace_event_iter_init(&iter, NULL);
+ trace_event_iter_init_all(&iter);
while ((ev = trace_event_iter_next(&iter)) != NULL) {
if (trace_event_is_vcpu(ev) &&
trace_event_get_state_static(ev) &&