diff options
author | Andi Kleen <ak@linux.intel.com> | 2019-03-14 15:49:55 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-03-19 11:56:20 -0300 |
commit | 03724b2e9c45d931eff0f304f2d3363ade65ca89 (patch) | |
tree | a5036771e339008135c20a5cbbcd9b38744f5726 /tools/perf/util/data.h | |
parent | 6f40b2a5dac4b448fe1e8d94dc4238cd95cd5e34 (diff) | |
download | linux-03724b2e9c45d931eff0f304f2d3363ade65ca89.tar.bz2 |
perf record: Allow to limit number of reported perf.data files
When doing long term recording and waiting for some event to snapshot
on, we often only care about the last minute or so.
The --switch-output command line option supports rotating the perf.data
file when the size exceeds a threshold. But the disk would still be
filled with unnecessary old files.
Add a new option to only keep a number of rotated files, so that the
disk space usage can be limited.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
LPU-Reference: 20190314225002.30108-3-andi@firstfloor.org
Link: https://lkml.kernel.org/n/tip-y5u2lik0ragt4vlktz6qc9ks@git.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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h index 6aef8746469f..259868a39019 100644 --- a/tools/perf/util/data.h +++ b/tools/perf/util/data.h @@ -70,7 +70,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); + size_t pos, bool at_exit, char **new_filepath); int perf_data__create_dir(struct perf_data *data, int nr); int perf_data__open_dir(struct perf_data *data); |