diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-02-24 20:06:44 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-02-25 10:42:05 -0300 |
commit | 145520631130bd64820b591775733256473eac62 (patch) | |
tree | 3e857a788cecfd1849031f0295a7bec4bd4cbf72 /tools/perf/util/data.h | |
parent | ccb7a71dcea071c7fd68192909c4e54561c88043 (diff) | |
download | linux-145520631130bd64820b591775733256473eac62.tar.gz linux-145520631130bd64820b591775733256473eac62.tar.bz2 linux-145520631130bd64820b591775733256473eac62.zip |
perf data: Add perf_data__(create_dir|close_dir) functions
Add perf_data__create_dir() to create nr files inside 'struct perf_data'
path directory:
int perf_data__create_dir(struct perf_data *data, int nr);
and function to close that data:
void perf_data__close_dir(struct perf_data *data);
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/20190224190656.30163-9-jolsa@kernel.org
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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h index 2bce28117ccf..2d0d015a7d4d 100644 --- a/tools/perf/util/data.h +++ b/tools/perf/util/data.h @@ -21,6 +21,11 @@ struct perf_data { bool is_pipe; bool force; enum perf_data_mode mode; + + struct { + struct perf_data_file *files; + int nr; + } dir; }; static inline bool perf_data__is_read(struct perf_data *data) @@ -64,4 +69,7 @@ ssize_t perf_data_file__write(struct perf_data_file *file, int perf_data__switch(struct perf_data *data, const char *postfix, size_t pos, bool at_exit); + +int perf_data__create_dir(struct perf_data *data, int nr); +void perf_data__close_dir(struct perf_data *data); #endif /* __PERF_DATA_H */ |