summaryrefslogtreecommitdiff
path: root/tools/perf/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/lib')
-rw-r--r--tools/perf/lib/include/internal/mmap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/lib/include/internal/mmap.h b/tools/perf/lib/include/internal/mmap.h
index 47c09f375fb6..10653b6e864e 100644
--- a/tools/perf/lib/include/internal/mmap.h
+++ b/tools/perf/lib/include/internal/mmap.h
@@ -2,10 +2,14 @@
#ifndef __LIBPERF_INTERNAL_MMAP_H
#define __LIBPERF_INTERNAL_MMAP_H
+#include <linux/compiler.h>
#include <linux/refcount.h>
#include <linux/types.h>
#include <stdbool.h>
+/* perf sample has 16 bits size limit */
+#define PERF_SAMPLE_MAX_SIZE (1 << 16)
+
/**
* struct perf_mmap - perf's ring buffer mmap details
*
@@ -21,6 +25,7 @@ struct perf_mmap {
u64 start;
u64 end;
bool overwrite;
+ char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
};
#endif /* __LIBPERF_INTERNAL_MMAP_H */