From 4815185902971c41fcdd700fa1fc3e1d9299900f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Mon, 11 Jul 2016 12:53:41 +0200 Subject: trace: Add per-vCPU tracing states for events with the 'vcpu' property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: LluĂ­s Vilanova Signed-off-by: Stefan Hajnoczi --- include/qom/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/qom') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index a6c6ed8..cbcd64c 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -24,8 +24,10 @@ #include "disas/bfd.h" #include "exec/hwaddr.h" #include "exec/memattrs.h" +#include "qemu/bitmap.h" #include "qemu/queue.h" #include "qemu/thread.h" +#include "trace/generated-events.h" typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size, void *opaque); @@ -280,6 +282,7 @@ struct qemu_work_item { * @kvm_fd: vCPU file descriptor for KVM. * @work_mutex: Lock to prevent multiple access to queued_work_*. * @queued_work_first: First asynchronous work pending. + * @trace_dstate: Dynamic tracing state of events for this vCPU (bitmask). * * State of one CPU core or thread. */ @@ -347,6 +350,9 @@ struct CPUState { struct KVMState *kvm_state; struct kvm_run *kvm_run; + /* Used for events with 'vcpu' and *without* the 'disabled' properties */ + DECLARE_BITMAP(trace_dstate, TRACE_VCPU_EVENT_COUNT); + /* TODO Move common fields from CPUArchState here. */ int cpu_index; /* used by alpha TCG */ uint32_t halted; /* used by alpha, cris, ppc TCG */ -- cgit v1.1