perf buildid-cache: Warn --purge-all failures
PATCH 1/1 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
$ ./perf buildid-cache -P
Error: Permission denied.--- tools/perf/builtin-buildid-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/builtin-buildid-cache.c +6 -2
@@ -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 ("Error: %s.\n" , +str_error_r (errno, sbuf,sizeof (sbuf))); + } + }if (missing_filename) ret =build_id_cache__fprintf_missing (session, stdout);
Signature · 1 line
2.14.3
Quoted 18 lines · On Wed, 9 May 2018 20:22:05 +0530 Ravi Bangoria <[email protected]>…
Warn perf buildid-cache --purge-all failures in non verbose mode. Ex,
$ sudo chown root:root /home/ravi/.debug -R $ ./perf buildid-cache -P Error: Permission denied.Suggested-by Masami Hiramatsu <[email protected]>Signed-off-by Ravi Bangoria <[email protected]>--- tools/perf/builtin-buildid-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)tools/perf/builtin-buildid-cache.c +0
-0
tools/perf/builtin-buildid-cache.c int cmd_buildid_cache(int argc, const char **argv) · line 494
Quoted 9 lines
tools/perf/builtin-buildid-cache.c +4
-2@@ -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 ("Error: %s.\n" , +str_error_r (errno, sbuf,sizeof (sbuf)));
I would like to see "Couldn't remove some caches: error reason..." as same as other error messages.
Thank you,
Quoted 8 lines
tools/perf/builtin-buildid-cache.c +2
-0+ } + }if (missing_filename) ret =build_id_cache__fprintf_missing (session, stdout);Signature · 1 line
2.14.3
Signature · 1 line
Masami Hiramatsu <[email protected]>
PATCH v2 1/1 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.--- tools/perf/builtin-buildid-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/builtin-buildid-cache.c +6 -2
@@ -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);
Signature · 1 line
2.14.3
Quoted 10 lines · On Thu, 10 May 2018 10:06:51 +0530 Ravi Bangoria <[email protected]>…
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 <[email protected]>Signed-off-by Ravi Bangoria <[email protected]>
This looks good to me.
Thanks!
Quoted 26 lines
--- tools/perf/builtin-buildid-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)tools/perf/builtin-buildid-cache.c +6
-2@@ -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);Signature · 1 line
2.14.3
Signature · 1 line
Masami Hiramatsu <[email protected]>
Em Fri, May 11, 2018 at 12:37:52AM +0900, Masami Hiramatsu escreveu:
Quoted 11 lines
Quoted 8 lines · On Thu, 10 May 2018 10:06:51 +0530 Ravi Bangoria <[email protected]>…
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.
Quoted 6 lines
Quoted 2 lines
Suggested-by Masami Hiramatsu <[email protected]>Signed-off-by Ravi Bangoria <[email protected]>This looks good to me.
Acked-by Masami Hiramatsu <[email protected]>
Applied to perf/core,
Thanks,
- Arnaldo
tip-bot for Ravi Bangoria
merge botperf buildid-cache: Warn --purge-all failures
Commit-ID: d8ed87bc171946313b2e6d26e1fec494da9154bc Gitweb: https://git.kernel.org/tip/d8ed87bc171946313b2e6d26e1fec494da9154bc Author: Ravi Bangoria <[email protected]> AuthorDate: Thu, 10 May 2018 10:06:51 +0530 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 15 May 2018 10:32:16 -0300
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.--- tools/perf/builtin-buildid-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/builtin-buildid-cache.c +6 -2
@@ -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);