diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-27 22:47:58 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-25 09:51:46 -0300 |
commit | 4443e6d7704ee85412e5cb0a0181d7ceee7e984f (patch) | |
tree | a7a3e5465a9b60e08737a6193e79adf7b6b5c08f /tools/perf/lib/include | |
parent | 8df7a869818ec278969d34e4792985f12b24f23d (diff) |
libperf: Add 'event_copy' to 'struct perf_mmap'
Move 'event_copy' from tools/perf's mmap to libperf's perf_mmap struct.
Committer notes:
Add linux/compiler.h as we need it for '__aligned'.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lore.kernel.org/lkml/20190913132355.21634-18-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/lib/include')
-rw-r--r-- | tools/perf/lib/include/internal/mmap.h | 5 |
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 */ |