diff options
author | Ravi Bangoria <ravi.bangoria@linux.ibm.com> | 2018-05-10 06:36:51 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-15 15:32:16 +0200 |
commit | d8ed87bc171946313b2e6d26e1fec494da9154bc (patch) | |
tree | be9b413ebd713a1a5c92dffde30f0aaefb591d70 /tools/perf/builtin-buildid-cache.c | |
parent | perf tests parse-events: Add intel_pt parse test (diff) | |
download | linux-d8ed87bc171946313b2e6d26e1fec494da9154bc.tar.xz linux-d8ed87bc171946313b2e6d26e1fec494da9154bc.zip |
perf buildid-cache: Warn --purge-all failures
Warn perf buildid-cache --purge-all failures in non verbose mode.
Ex.:
$ sudo chown root:root /home/ravi/.debug -R
$ sudo chmod 700 /home/ravi/.debug/ -R
$ ./perf buildid-cache -P
Couldn't remove some caches. Error: Permission denied.
Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20180510043651.12189-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-buildid-cache.c')
-rw-r--r-- | tools/perf/builtin-buildid-cache.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index 7a7403913b57..115110a4796a 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -488,8 +488,12 @@ int cmd_buildid_cache(int argc, const char **argv) } } - if (purge_all) - ret = build_id_cache__purge_all(); + if (purge_all) { + if (build_id_cache__purge_all()) { + pr_warning("Couldn't remove some caches. Error: %s.\n", + str_error_r(errno, sbuf, sizeof(sbuf))); + } + } if (missing_filename) ret = build_id_cache__fprintf_missing(session, stdout); |