summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/data.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-01-23 22:25:41 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-10-30 17:37:37 +0100
commiteae8ad8042d82775da1ddf3faa915b32854d9cf4 (patch)
treec00e93fe4edcd756a8dec1cf4e86a51473c636fc /tools/perf/util/data.h
parentperf tools: Rename struct perf_data_file to perf_data (diff)
downloadlinux-eae8ad8042d82775da1ddf3faa915b32854d9cf4.tar.xz
linux-eae8ad8042d82775da1ddf3faa915b32854d9cf4.zip
perf tools: Add struct perf_data_file
Add struct perf_data_file to represent a single file within a perf_data struct. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Changbin Du <changbin.du@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-c3f9p4xzykr845ktqcek6p4t@git.kernel.org [ Fixup recent changes in 'perf script --per-event-dump' ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/data.h')
-rw-r--r--tools/perf/util/data.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h
index a1f9d70426b1..1797bed3aa4b 100644
--- a/tools/perf/util/data.h
+++ b/tools/perf/util/data.h
@@ -8,9 +8,13 @@ enum perf_data_mode {
PERF_DATA_MODE_READ,
};
+struct perf_data_file {
+ const char *path;
+ int fd;
+};
+
struct perf_data {
- const char *path;
- int fd;
+ struct perf_data_file file;
bool is_pipe;
bool force;
unsigned long size;
@@ -34,7 +38,7 @@ static inline int perf_data__is_pipe(struct perf_data *data)
static inline int perf_data__fd(struct perf_data *data)
{
- return data->fd;
+ return data->file.fd;
}
static inline unsigned long perf_data__size(struct perf_data *data)