Skip to content

perf buildid-cache: Add clean command

Jiri Olsa lkml 1 version Applied

Status from this message: Applied

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8perf tools: Use single strcmp call instead of twotools/perf/util/config.c+1 -10 replies
2/8perf tools: Remove extra debugdir variablestools/perf/builtin-buildid-cache.c tools/perf/util/build-id.c+7 -130 replies
3/8perf tools: Add --buildid-dir option to set cache directorytools/perf/Documentation/perf.txt tools/perf/perf.c tools/perf/util/config.c +1 more+22 -61 reply
4/8perf buildid-cache: Add clean commandtools/perf/Documentation/perf-buildid-cache.txt tools/perf/builtin-buildid-cache.c+512 -10 replies
5/8perf buildid-cache: Add automated teststools/perf/Makefile.perf tools/perf/tests/buildid-cache.c tools/perf/tests/buildid-cache.sh +2 more+163 -12 replies
6/8perf buildid cache: Fix -a segfaulttools/perf/builtin-buildid-cache.c+1 -11 reply
7/8perf buildid-cache: Fix kallsyms removaltools/perf/builtin-buildid-cache.c+32 -20 replies
8/8perf buildid-cache: Try to remove empty directoriestools/perf/util/build-id.c+43 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] perf buildid-cache: Add clean command

hi,
adding 'perf buildid-cache clean' command to allow removal files from '~/.debug` cache plus other fixes.

Basically the clean command allows to display/remove cache files/sizes like:

Display cache files older than 3 days:

  $ perf buildid-cache clean 3d

Remove cache files older than 3 days:

  $ perf buildid-cache clean 3d -r

Total cache removal:

  $ perf buildid-cache clean -r

Remove and display items bigger than 200M

  $ perf buildid-cache clean -r -a 200M

Also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/core_buildid_cache_clean

thanks,
jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Steven Rostedt <[email protected]>

---
Jiri Olsa (8):
perf tools: Use single strcmp call instead of two perf tools: Remove extra debugdir variables
perf tools: Add --buildid-dir option to set cache directory perf buildid-cache: Add clean command
perf buildid-cache: Add automated tests
perf buildid cache: Fix -a segfault
perf buildid-cache: Fix kallsyms removal
perf buildid-cache: Try to remove empty directories

 tools/perf/Documentation/perf-buildid-cache.txt |  59 +++++++++++
 tools/perf/Documentation/perf.txt               |   4 +
 tools/perf/Makefile.perf                        |   7 +-
 tools/perf/builtin-buildid-cache.c              | 501 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 tools/perf/perf.c                               |  14 ++-
 tools/perf/tests/buildid-cache.c                |  88 ++++++++++++++++
 tools/perf/tests/buildid-cache.sh               |  60 +++++++++++
 tools/perf/tests/builtin-test.c                 |   8 ++
 tools/perf/tests/tests.h                        |   1 +
 tools/perf/util/build-id.c                      |  53 ++++++++--
 tools/perf/util/config.c                        |  10 +-
 tools/perf/util/util.h                          |   2 +-
 12 files changed, 781 insertions(+), 26 deletions(-)
 create mode 100644 tools/perf/tests/buildid-cache.c
 create mode 100755 tools/perf/tests/buildid-cache.sh