perf tools: Remove also guest kcore_dir with host kcore_dir
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 11 Jul 2022 09:32:03 +0000 (12:32 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 20 Jul 2022 14:08:30 +0000 (11:08 -0300)
commit386e0d83d351a4461525b06b845ffcd58235381e
treef1419388352f1cc1a173b2a4129cfdfc1b48f057
parent13a133b2550e062bb2710e9dd3d9a6b794e91053
perf tools: Remove also guest kcore_dir with host kcore_dir

Copies of /proc/kallsyms, /proc/modules and an extract of /proc/kcore can
be stored in the perf.data output directory under the subdirectory named
kcore_dir. Guest machines will have their files also under subdirectories
beginning kcore_dir__ followed by the machine pid. Remove these also when
removing kcore_dir.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: https://lore.kernel.org/r/20220711093218.10967-21-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/util.c