|
@@ -204,6 +204,24 @@ static void trace_destroy_fields(struct trace_event_call *call)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * run-time version of trace_event_get_offsets_<call>() that returns the last
|
|
|
+ * accessible offset of trace fields excluding __dynamic_array bytes
|
|
|
+ */
|
|
|
+int trace_event_get_offsets(struct trace_event_call *call)
|
|
|
+{
|
|
|
+ struct ftrace_event_field *tail;
|
|
|
+ struct list_head *head;
|
|
|
+
|
|
|
+ head = trace_get_fields(call);
|
|
|
+ /*
|
|
|
+ * head->next points to the last field with the largest offset,
|
|
|
+ * since it was added last by trace_define_field()
|
|
|
+ */
|
|
|
+ tail = list_first_entry(head, struct ftrace_event_field, link);
|
|
|
+ return tail->offset + tail->size;
|
|
|
+}
|
|
|
+
|
|
|
int trace_event_raw_init(struct trace_event_call *call)
|
|
|
{
|
|
|
int id;
|