All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Nicholas Fraser <nfraser@codeweavers.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-kernel@vger.kernel.org,
	Ulrich Czekalla <uczekalla@codeweavers.com>,
	Huw Davies <huw@codeweavers.com>
Subject: Re: [PATCH 1/2] perf archive: Fix filtering of empty build-ids
Date: Wed, 24 Feb 2021 14:50:20 +0100	[thread overview]
Message-ID: <YDZZnDBSsRCtekK3@krava> (raw)
In-Reply-To: <442bffc7-ac5c-0975-b876-a549efce2413@codeweavers.com>

On Fri, Feb 19, 2021 at 11:09:32AM -0500, Nicholas Fraser wrote:
> A non-existent build-id used to be treated as all-zero SHA-1 hash.
> Build-ids are now variable width. A non-existent build-id is an empty
> string and "perf buildid-list" pads this with spaces. This is true even
> when using old perf.data files recorded from older versions of perf;
> "perf buildid-list" never reports an all-zero hash anymore.
> 
> This fixes "perf-archive" to skip missing build-ids by skipping lines
> that start with a padding space rather than with zeroes.
> 
> Signed-off-by: Nicholas Fraser <nfraser@codeweavers.com>

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/perf/perf-archive.sh | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh
> index 0cfb3e2cefef..133f0eddbcc4 100644
> --- a/tools/perf/perf-archive.sh
> +++ b/tools/perf/perf-archive.sh
> @@ -20,9 +20,8 @@ else
>  fi
>  
>  BUILDIDS=$(mktemp /tmp/perf-archive-buildids.XXXXXX)
> -NOBUILDID=0000000000000000000000000000000000000000
>  
> -perf buildid-list -i $PERF_DATA --with-hits | grep -v "^$NOBUILDID " > $BUILDIDS
> +perf buildid-list -i $PERF_DATA --with-hits | grep -v "^ " > $BUILDIDS
>  if [ ! -s $BUILDIDS ] ; then
>  	echo "perf archive: no build-ids found"
>  	rm $BUILDIDS || true
> -- 
> 2.30.1
> 


  reply	other threads:[~2021-02-24 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 16:09 [PATCH 1/2] perf archive: Fix filtering of empty build-ids Nicholas Fraser
2021-02-24 13:50 ` Jiri Olsa [this message]
2021-03-03 15:56   ` Arnaldo Carvalho de Melo

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=YDZZnDBSsRCtekK3@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=huw@codeweavers.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nfraser@codeweavers.com \
    --cc=peterz@infradead.org \
    --cc=uczekalla@codeweavers.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.