aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-05-26 17:53:53 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2023-06-01 11:05:05 -0400
commit710320137099b8d86cedb4f58de2455acd58cbde (patch)
treee5d166d22c98d46cb29cb62b32fe24be4ec80a52 /trace
parent78f314cf8349a76a757dbcc4da88bf9a0b20d3a1 (diff)
trace: remove vcpu_id from the TraceEvent structure
This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20230526165401.574474-4-alex.bennee@linaro.org Message-Id: <20230524133952.3971948-4-alex.bennee@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/control-internal.h4
-rw-r--r--trace/control.c10
-rw-r--r--trace/event-internal.h2
3 files changed, 2 insertions, 14 deletions
diff --git a/trace/control-internal.h b/trace/control-internal.h
index 8b2b50a7cf..0178121720 100644
--- a/trace/control-internal.h
+++ b/trace/control-internal.h
@@ -27,12 +27,12 @@ static inline uint32_t trace_event_get_id(TraceEvent *ev)
static inline uint32_t trace_event_get_vcpu_id(TraceEvent *ev)
{
- return ev->vcpu_id;
+ return 0;
}
static inline bool trace_event_is_vcpu(TraceEvent *ev)
{
- return ev->vcpu_id != TRACE_VCPU_EVENT_NONE;
+ return false;
}
static inline const char * trace_event_get_name(TraceEvent *ev)
diff --git a/trace/control.c b/trace/control.c
index d24af91004..5dfb609954 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -68,16 +68,6 @@ void trace_event_register_group(TraceEvent **events)
size_t i;
for (i = 0; events[i] != NULL; i++) {
events[i]->id = next_id++;
- if (events[i]->vcpu_id == TRACE_VCPU_EVENT_NONE) {
- continue;
- }
-
- if (likely(next_vcpu_id < CPU_TRACE_DSTATE_MAX_EVENTS)) {
- events[i]->vcpu_id = next_vcpu_id++;
- } else {
- warn_report("too many vcpu trace events; dropping '%s'",
- events[i]->name);
- }
}
event_groups = g_renew(TraceEventGroup, event_groups, nevent_groups + 1);
event_groups[nevent_groups].events = events;
diff --git a/trace/event-internal.h b/trace/event-internal.h
index f63500b37e..0c24e01b52 100644
--- a/trace/event-internal.h
+++ b/trace/event-internal.h
@@ -19,7 +19,6 @@
/**
* TraceEvent:
* @id: Unique event identifier.
- * @vcpu_id: Unique per-vCPU event identifier.
* @name: Event name.
* @sstate: Static tracing state.
* @dstate: Dynamic tracing state
@@ -33,7 +32,6 @@
*/
typedef struct TraceEvent {
uint32_t id;
- uint32_t vcpu_id;
const char * name;
const bool sstate;
uint16_t *dstate;