linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf buildid-cache: Warn --purge-all failures
@ 2018-05-09 14:52 Ravi Bangoria
  2018-05-10  1:28 ` Masami Hiramatsu
  0 siblings, 1 reply; 6+ messages in thread
From: Ravi Bangoria @ 2018-05-09 14:52 UTC (permalink / raw)
  To: acme, mhiramat; +Cc: jolsa, namhyung, linux-kernel, Ravi Bangoria

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 <mhiramat@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
---
 tools/perf/builtin-buildid-cache.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 7a7403913b57..ef6b3cc8d57d 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("Error: %s.\n",
+				str_error_r(errno, sbuf, sizeof(sbuf)));
+		}
+	}
 
 	if (missing_filename)
 		ret = build_id_cache__fprintf_missing(session, stdout);
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] perf buildid-cache: Warn --purge-all failures
  2018-05-09 14:52 [PATCH] perf buildid-cache: Warn --purge-all failures Ravi Bangoria
@ 2018-05-10  1:28 ` Masami Hiramatsu
  2018-05-10  4:36   ` [PATCH v2] " Ravi Bangoria
  0 siblings, 1 reply; 6+ messages in thread
From: Masami Hiramatsu @ 2018-05-10  1:28 UTC (permalink / raw)
  To: Ravi Bangoria; +Cc: acme, jolsa, namhyung, linux-kernel

On Wed,  9 May 2018 20:22:05 +0530
Ravi Bangoria <ravi.bangoria@linux.ibm.com> wrote:

> 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 <mhiramat@kernel.org>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
> ---
>  tools/perf/builtin-buildid-cache.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
> index 7a7403913b57..ef6b3cc8d57d 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("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,

> +		}
> +	}
>  
>  	if (missing_filename)
>  		ret = build_id_cache__fprintf_missing(session, stdout);
> -- 
> 2.14.3
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] perf buildid-cache: Warn --purge-all failures
  2018-05-10  1:28 ` Masami Hiramatsu
@ 2018-05-10  4:36   ` Ravi Bangoria
  2018-05-10 15:37     ` Masami Hiramatsu
  2018-05-16 18:01     ` [tip:perf/core] " tip-bot for Ravi Bangoria
  0 siblings, 2 replies; 6+ messages in thread
From: Ravi Bangoria @ 2018-05-10  4:36 UTC (permalink / raw)
  To: acme, mhiramat; +Cc: jolsa, namhyung, linux-kernel, Ravi Bangoria

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>
---
 tools/perf/builtin-buildid-cache.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 7a7403913b57..ef6b3cc8d57d 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);
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] perf buildid-cache: Warn --purge-all failures
  2018-05-10  4:36   ` [PATCH v2] " Ravi Bangoria
@ 2018-05-10 15:37     ` Masami Hiramatsu
  2018-05-10 18:33       ` Arnaldo Carvalho de Melo
  2018-05-16 18:01     ` [tip:perf/core] " tip-bot for Ravi Bangoria
  1 sibling, 1 reply; 6+ messages in thread
From: Masami Hiramatsu @ 2018-05-10 15:37 UTC (permalink / raw)
  To: Ravi Bangoria; +Cc: acme, jolsa, namhyung, linux-kernel

On Thu, 10 May 2018 10:06:51 +0530
Ravi Bangoria <ravi.bangoria@linux.ibm.com> wrote:

> 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>

This looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> ---
>  tools/perf/builtin-buildid-cache.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
> index 7a7403913b57..ef6b3cc8d57d 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);
> -- 
> 2.14.3
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] perf buildid-cache: Warn --purge-all failures
  2018-05-10 15:37     ` Masami Hiramatsu
@ 2018-05-10 18:33       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-05-10 18:33 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Ravi Bangoria, jolsa, namhyung, linux-kernel

Em Fri, May 11, 2018 at 12:37:52AM +0900, Masami Hiramatsu escreveu:
> On Thu, 10 May 2018 10:06:51 +0530
> Ravi Bangoria <ravi.bangoria@linux.ibm.com> wrote:
> 
> > 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>
> 
> This looks good to me.
> 
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Applied to perf/core,

Thanks,

- Arnaldo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip:perf/core] perf buildid-cache: Warn --purge-all failures
  2018-05-10  4:36   ` [PATCH v2] " Ravi Bangoria
  2018-05-10 15:37     ` Masami Hiramatsu
@ 2018-05-16 18:01     ` tip-bot for Ravi Bangoria
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Ravi Bangoria @ 2018-05-16 18:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, linux-kernel, mhiramat, mingo, acme, namhyung, jolsa, hpa,
	ravi.bangoria

Commit-ID:  d8ed87bc171946313b2e6d26e1fec494da9154bc
Gitweb:     https://git.kernel.org/tip/d8ed87bc171946313b2e6d26e1fec494da9154bc
Author:     Ravi Bangoria <ravi.bangoria@linux.ibm.com>
AuthorDate: Thu, 10 May 2018 10:06:51 +0530
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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.

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>
---
 tools/perf/builtin-buildid-cache.c | 8 ++++++--
 1 file 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);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-16 18:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 14:52 [PATCH] perf buildid-cache: Warn --purge-all failures Ravi Bangoria
2018-05-10  1:28 ` Masami Hiramatsu
2018-05-10  4:36   ` [PATCH v2] " Ravi Bangoria
2018-05-10 15:37     ` Masami Hiramatsu
2018-05-10 18:33       ` Arnaldo Carvalho de Melo
2018-05-16 18:01     ` [tip:perf/core] " tip-bot for Ravi Bangoria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).