diff options
author | Lluís Vilanova <vilanova@ac.upc.edu> | 2016-07-11 12:53:24 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-07-18 18:13:54 +0100 |
commit | 17f7ac75df3909c384c18274b41a2a91192599e3 (patch) | |
tree | b5000f5a073806b11d4a5e4f73336df85f82d348 /trace/control.h | |
parent | 6913e79c3677a4282203fdd79af7927a94d0427e (diff) |
trace: Identify events with the 'vcpu' property
A new event attribute 'cpu_id' is added to have a separate ID
space ('TRACE_VCPU_*') for all events with the 'vcpu' property.
These are later used to identify which events are enabled on each vCPU.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control.h')
-rw-r--r-- | trace/control.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/trace/control.h b/trace/control.h index 452a800eb2..d7d6500438 100644 --- a/trace/control.h +++ b/trace/control.h @@ -86,6 +86,23 @@ static TraceEventID trace_event_count(void); static TraceEventID trace_event_get_id(TraceEvent *ev); /** + * trace_event_get_vcpu_id: + * + * Get the per-vCPU identifier of an event. + * + * Special value #TRACE_VCPU_EVENT_COUNT means the event is not vCPU-specific + * (does not have the "vcpu" property). + */ +static TraceEventVCPUID trace_event_get_vcpu_id(TraceEvent *ev); + +/** + * trace_event_is_vcpu: + * + * Whether this is a per-vCPU event. + */ +static bool trace_event_is_vcpu(TraceEvent *ev); + +/** * trace_event_get_name: * * Get the name of an event. |