Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3168945pxb; Fri, 12 Feb 2021 10:52:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyATB/a2C6OldK5qryytGzTUbekTf3MMDyrCPiuXXlV+GdjaROhs8R+KeXrOJzhqs9gbg9r X-Received: by 2002:a05:6402:1155:: with SMTP id g21mr4716604edw.279.1613155963676; Fri, 12 Feb 2021 10:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613155963; cv=none; d=google.com; s=arc-20160816; b=gXA/zxsAHzGJzSjuVp7B3IhGPIkkuV7fVgl4NBddhHahT4CRGOP+wpUDvviU8o+eGT Uq0CJNgjtDjb63XtdN+oHrCqCp5U0LSnX9bnEevrUpeyaqFnwQBQMhvxXNeqpdEGVoC0 /7VeR/IO8Sf4+N0Xk+ZZJRcgNJ5DLIIRDtpr2vFuJlSiBiwy8erLEGcfnM6UhoSyBfTw DrRujYphv2zQW0O6wk68l/ZHPij7A+MZM8cZqCeV0BQJLh7JFLv/m3pwxS0SlkBNGOLD zD3ASlPPjDZXTbzYK8HoPW1AnRwbSoc82qiOd/SjxqsI8h0GQMD6JdqhEAVJPuEn4Vzr 4uUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=e0D7/4VpviQormwa11z/jzEJDK8wsl9J3NDPCqGhR9I=; b=R8++V5EihnMnDNuGAo5lHoqu/yLyWzFCCruYsFT7SC4o2XSjvQSXY0ML7+N67W9fvX Ed8YzEMsSsVC279Miu2EmYrhaWShbdFZcTIyq2lRG2fNwiAXl3G2t6/3aOSfrxDnUMzf eBiXjBjOwE5lJ/P8XF2FU8fF1/xvs0IPTK7CVYE/4XPDMcANNra6QzUyDpKsvQ3wNG2F z5qnD2sLVIYH5EQpgz5wFhMXZH5hQVNFezCHDtzZrvieVBpi7xo0x4HrZHyOX8uFgmNL W1NQtdU/plYOv2dyrPvBC0sOBvmrhSJayFD5fQWJ7eGQkF2H0d2RF7AdhfGuhHtSOUd2 4rPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@codeweavers.com header.s=6377696661 header.b=hNdfe3Jd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codeweavers.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si7314435edw.164.2021.02.12.10.52.19; Fri, 12 Feb 2021 10:52:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@codeweavers.com header.s=6377696661 header.b=hNdfe3Jd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codeweavers.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231348AbhBLSug (ORCPT + 99 others); Fri, 12 Feb 2021 13:50:36 -0500 Received: from mail.codeweavers.com ([50.203.203.244]:46734 "EHLO mail.codeweavers.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbhBLSue (ORCPT ); Fri, 12 Feb 2021 13:50:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codeweavers.com; s=6377696661; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e0D7/4VpviQormwa11z/jzEJDK8wsl9J3NDPCqGhR9I=; b=hNdfe3JdipqyBAB2SpHPfrTyjm iEmkEw5gF4j1oAfsqjOpSNEEnd5zKojplPwH6dPyqzX/URciM5QyA3BD+RprATf9TtxA4EuJP5C/B aUYB7rKmBFnXAWuvnskB8ByRzi1YTOjBX5tfjfJoniOtWvLMyTvtkMGnVDchRPdLGZko=; Received: from [10.69.141.136] by mail.codeweavers.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lAdVg-000451-4C; Fri, 12 Feb 2021 12:49:46 -0600 Subject: Re: [PATCH 3/4] perf archive: Fix filtering of empty build-ids To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , "Frank Ch. Eigler" , Song Liu , Adrian Hunter , Kim Phillips , Tommi Rantala , Remi Bernon , linux-kernel@vger.kernel.org, Ulrich Czekalla , Huw Davies References: <7708cca1-b8f6-c394-75f1-5f9681d625d0@codeweavers.com> <20210212122901.GB1398414@kernel.org> From: Nicholas Fraser Message-ID: <8f50e586-ae58-ef4e-a594-e2248203a2a7@codeweavers.com> Date: Fri, 12 Feb 2021 13:49:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210212122901.GB1398414@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -40.6 X-Spam-Report: Spam detection software, running on the system "mail.codeweavers.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The current version of "perf buildid-list" prints missing build-ids as blank even when loading perf.data files generated from older versions of perf. I've tested with a few older versions. Since perf-archive is an external script that calls back into perf, it could in theory find a different older version that still returns zeroes. We could make it look for a matching perf, e.g. "$(dirn [...] Content analysis details: (-40.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 USER_IN_WELCOMELIST user is listed in 'welcomelist_from' -20 USER_IN_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST -20 ALL_TRUSTED Passed through trusted hosts only via SMTP -0.5 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 NICE_REPLY_A Looks like a legit reply (A) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current version of "perf buildid-list" prints missing build-ids as blank even when loading perf.data files generated from older versions of perf. I've tested with a few older versions. Since perf-archive is an external script that calls back into perf, it could in theory find a different older version that still returns zeroes. We could make it look for a matching perf, e.g. "$(dirname "$0")/perf". Unfortunately that won't work in general because at least on my system perf-archive is installed to a different path than perf. Nick On 2021-02-12 7:29 a.m., Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 10, 2021 at 02:17:49PM -0500, Nicholas Fraser escreveu: >> 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 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 >> --- >> 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 > > What should we do when using older files? We have to support both cases. > > - Arnaldo >