perf data: Move size to struct perf_data_file

We are about to add support for multiple files, so we need each file to
keep its size.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20190221094145.9151-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2019-02-21 10:41:29 +01:00
committed by Arnaldo Carvalho de Melo
parent c60f83b813
commit 45112e89a8
3 changed files with 5 additions and 6 deletions

View File

@@ -12,13 +12,13 @@ enum perf_data_mode {
struct perf_data_file {
const char *path;
int fd;
unsigned long size;
};
struct perf_data {
struct perf_data_file file;
bool is_pipe;
bool force;
unsigned long size;
enum perf_data_mode mode;
};
@@ -44,7 +44,7 @@ static inline int perf_data__fd(struct perf_data *data)
static inline unsigned long perf_data__size(struct perf_data *data)
{
return data->size;
return data->file.size;
}
int perf_data__open(struct perf_data *data);