summaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2016-07-11 12:53:41 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2016-07-18 18:23:12 +0100
commit4815185902971c41fcdd700fa1fc3e1d9299900f (patch)
treefcdcdbb543e1ea9828e4e8820368675692f761f3 /include/qom
parente1d6e0a4c0e23b30501b887211f1fa6e0eb799a3 (diff)
downloadqemu-4815185902971c41fcdd700fa1fc3e1d9299900f.tar.gz
trace: Add per-vCPU tracing states for events with the 'vcpu' property
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 <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index a6c6ed8b57..cbcd64c92b 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 */