]> git.baikalelectronics.ru Git - kernel.git/commit
perf record: Allow to limit number of reported perf.data files
authorAndi Kleen <ak@linux.intel.com>
Thu, 14 Mar 2019 22:49:55 +0000 (15:49 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 19 Mar 2019 14:56:20 +0000 (11:56 -0300)
commitc134c3984dd7bc9d5dd8eaf38c7e2d6bdb2f54dc
treea5036771e339008135c20a5cbbcd9b38744f5726
parent1195b32e6ff2d245ec91fdf298f19cd1071dc649
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>
tools/perf/Documentation/perf-record.txt
tools/perf/builtin-record.c
tools/perf/util/data.c
tools/perf/util/data.h