summaryrefslogtreecommitdiff
path: root/tools/perf/util/data.h
diff options
context:
space:
mode:
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)