perf mmap: Map data buffer for preserving collected data
The map->data buffer is used to preserve map->base profiling data for writing to disk. AIO map->cblock is used to queue corresponding map->data buffer for asynchronous writing. Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com> Reviewed-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/5fcda10c-6c63-68df-383a-c6d9e5d1f918@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
2a07d81474
commit
0b77383134
@@ -6,6 +6,9 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ring_buffer.h>
|
||||
#include <stdbool.h>
|
||||
#ifdef HAVE_AIO_SUPPORT
|
||||
#include <aio.h>
|
||||
#endif
|
||||
#include "auxtrace.h"
|
||||
#include "event.h"
|
||||
|
||||
@@ -26,6 +29,12 @@ struct perf_mmap {
|
||||
bool overwrite;
|
||||
struct auxtrace_mmap auxtrace_mmap;
|
||||
char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
|
||||
#ifdef HAVE_AIO_SUPPORT
|
||||
struct {
|
||||
void *data;
|
||||
struct aiocb cblock;
|
||||
} aio;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -57,7 +66,7 @@ enum bkw_mmap_state {
|
||||
};
|
||||
|
||||
struct mmap_params {
|
||||
int prot, mask;
|
||||
int prot, mask, nr_cblocks;
|
||||
struct auxtrace_mmap_params auxtrace_mp;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user