Re: Perf ABI versioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



and the tiny (untested) patch which should
add a version on top of /sys/kernel/debug/trace:

---
 Documentation/trace/events.changes |    6 ++++++
 kernel/trace/trace.c               |    1 +
 kernel/trace/trace.h               |    2 ++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Documentation/trace/events.changes b/Documentation/trace/events.changes
new file mode 100644
index 0000000..bd29abc
--- /dev/null
+++ b/Documentation/trace/events.changes
@@ -0,0 +1,6 @@
+Version 2:
+<Modifications are tracked here>
+
+Version 1:
+Initial version.
+Available events and their formats:
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index dc53ecb..602885a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2043,6 +2043,7 @@ void trace_default_header(struct seq_file *m)
 {
 	struct trace_iterator *iter = m->private;
 
+	seq_puts(m, "# Perf ABI Version %d\n", PERF_ABI_VERSION);
 	if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
 		/* print nothing if the buffers are empty */
 		if (trace_empty(iter))
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 9021f8c..c23a7a2 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -13,6 +13,8 @@
 #include <linux/trace_seq.h>
 #include <linux/ftrace_event.h>
 
+#define PERF_ABI_VERSION 1
+
 enum trace_type {
 	__TRACE_FIRST_TYPE = 0,
 

--
To unsubscribe from this list: send the line "unsubscribe linux-trace-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux