From: Nicholas Fraser <nfraser@codeweavers.com>
To: 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>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Nicholas Fraser <nfraser@codeweavers.com>,
Ian Rogers <irogers@google.com>,
linux-kernel@vger.kernel.org
Cc: Ulrich Czekalla <uczekalla@codeweavers.com>,
Huw Davies <huw@codeweavers.com>
Subject: [PATCH 1/2] perf archive: Fix filtering of empty build-ids
Date: Fri, 19 Feb 2021 11:09:32 -0500 [thread overview]
Message-ID: <442bffc7-ac5c-0975-b876-a549efce2413@codeweavers.com> (raw)
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>
---
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
next reply other threads:[~2021-02-19 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 16:09 Nicholas Fraser [this message]
2021-02-24 13:50 ` Jiri Olsa
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=442bffc7-ac5c-0975-b876-a549efce2413@codeweavers.com \
--to=nfraser@codeweavers.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=huw@codeweavers.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®