public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Dmitry Dolgov <9erthalion6@gmail.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf auxtrace: Fix address filter duplicate symbol selection
Date: Wed, 11 Jan 2023 10:16:39 -0300	[thread overview]
Message-ID: <Y762t7QWEKPYRFC4@kernel.org> (raw)
In-Reply-To: <20230110185659.15979-1-adrian.hunter@intel.com>

Em Tue, Jan 10, 2023 at 08:56:59PM +0200, Adrian Hunter escreveu:
>   After:
> 
>     $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test
>     First func
>     Second func
>     [ perf record: Woken up 1 times to write data ]
>     [ perf record: Captured and wrote 0.016 MB perf.data ]
>     $ perf script --itrace=b -Ftime,flags,ip,sym,addr --ns
>     1231062.526977619:   tr strt                               0 [unknown] =>     558495708179 func
>     1231062.526977619:   tr end  call               558495708188 func =>     558495708050 _init
>     1231062.526979286:   tr strt                               0 [unknown] =>     55849570818d func
>     1231062.526979286:   tr end  return             55849570818f func =>     55849570819d other
> 
> Reported-by: Dmitry Dolgov <9erthalion6@gmail.com>
> Fixes: 1b36c03e3569 ("perf record: Add support for using symbols in address filters")
> Cc: stable@vger.kernel.org
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Thanks, applied.

Dmitry, can I have your Tested-by? Checking the original thread...

- Arnaldo

> ---
>  tools/perf/util/auxtrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index 265d20cc126b..c2e323cd7d49 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -2611,7 +2611,7 @@ static int find_dso_sym(struct dso *dso, const char *sym_name, u64 *start,
>  				*size = sym->start - *start;
>  			if (idx > 0) {
>  				if (*size)
> -					return 1;
> +					return 0;
>  			} else if (dso_sym_match(sym, sym_name, &cnt, idx)) {
>  				print_duplicate_syms(dso, sym_name);
>  				return -EINVAL;
> -- 
> 2.34.1

      reply	other threads:[~2023-01-11 13:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 18:56 [PATCH] perf auxtrace: Fix address filter duplicate symbol selection Adrian Hunter
2023-01-11 13:16 ` Arnaldo Carvalho de Melo [this message]

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=Y762t7QWEKPYRFC4@kernel.org \
    --to=acme@kernel.org \
    --cc=9erthalion6@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@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