lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 15/18] perf: add ABI reference sizes
Date
This patch adds reference sizes for revision 1
and 2 of the perf_event ABI, i.e., the size of
the perf_event_attr struct.

With Rev1: config2 was added = +8 bytes
With Rev2: branch_sample_type was added = +8 bytes

Adds the definition for Rev1, Rev2.

This is useful for tools trying to decode the revision
numbers based on the size of the struct.

Signed-off-by: Stephane Eranian <eranian@google.com>
---
include/linux/perf_event.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 6d9d712..91452ed 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -195,6 +195,8 @@ enum perf_event_read_format {
};

#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */
+#define PERF_ATTR_SIZE_VER1 72 /* add: config2 */
+#define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */

/*
* Hardware event_id to monitor via a performance monitoring event:
--
1.7.1


\
 
 \ /
  Last update: 2012-01-27 22:01    [W:0.133 / U:76.888 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site