public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf auxtrace: Improve address filter error message when there is no DSO
Date: Fri, 1 Mar 2019 14:47:55 -0300	[thread overview]
Message-ID: <20190301174755.GI13100@kernel.org> (raw)
In-Reply-To: <20190301122902.18707-1-adrian.hunter@intel.com>

Em Fri, Mar 01, 2019 at 02:29:02PM +0200, Adrian Hunter escreveu:
> The message does not indicate the possibility that the symbol is not
> found because the file does not exist.
> 
> Before:
> 
>   $ perf record -e intel_pt//u --filter 'filter strcmp / strcpy @ foo ' ls
>   Symbol 'strcmp' not found.
>   Note that symbols must be functions.
>   Failed to parse address filter: 'filter strcmp / strcpy @ foo '
>   Filter format is: filter|start|stop|tracestop <start symbol or address> [/ <end symbol or size>] [@<file name>]
>   Where multiple filters are separated by space or comma.
> 
> After:
> 
>   $ perf record -e intel_pt//u --filter 'filter strcmp / strcpy @ foo ' ls
>   File 'foo' not found or has no symbols.
>   Symbol 'strcmp' not found.
>   Note that symbols must be functions.
>   Failed to parse address filter: 'filter strcmp / strcpy @ foo '
>   Filter format is: filter|start|stop|tracestop <start symbol or address> [/ <end symbol or size>] [@<file name>]
>   Where multiple filters are separated by space or comma.

Thanks, applied.

- Arnaldo
 
> Reported-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/util/auxtrace.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index 267e54df511b..fb76b6b232d4 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -1918,7 +1918,8 @@ static struct dso *load_dso(const char *name)
>  	if (!map)
>  		return NULL;
>  
> -	map__load(map);
> +	if (map__load(map) < 0)
> +		pr_err("File '%s' not found or has no symbols.\n", name);
>  
>  	dso = dso__get(map->dso);
>  
> -- 
> 2.17.1

-- 

- Arnaldo

           reply	other threads:[~2019-03-01 17:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20190301122902.18707-1-adrian.hunter@intel.com>]

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=20190301174755.GI13100@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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