From 45112e89a8b2b4c9a004147cbfb448b1200cfbf7 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Thu, 21 Feb 2019 10:41:29 +0100 Subject: 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 Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190221094145.9151-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/data.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/perf/util/data.h') diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h index 4828f7feea89..85f9c0dbf982 100644 --- a/tools/perf/util/data.h +++ b/tools/perf/util/data.h @@ -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); -- cgit v1.2.3-59-g8ed1b