public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: acme@kernel.org, jolsa@redhat.com, namhyung@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf buildid-cache: Warn --purge-all failures
Date: Thu, 10 May 2018 10:28:08 +0900	[thread overview]
Message-ID: <20180510102808.5fcc479ccda0dd0eb08b7383@kernel.org> (raw)
In-Reply-To: <20180509145205.3241-1-ravi.bangoria@linux.ibm.com>

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>

  reply	other threads:[~2018-05-10  1:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 14:52 [PATCH] perf buildid-cache: Warn --purge-all failures Ravi Bangoria
2018-05-10  1:28 ` Masami Hiramatsu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180510102808.5fcc479ccda0dd0eb08b7383@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=ravi.bangoria@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox