Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7509843pxb; Thu, 18 Feb 2021 12:00:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2FzejkGK37/9hkXTqEdF5DR1W1n8TDGZ/KwG1TiWEP/M3GykONuSKz4jDEGFxGjn5myMX X-Received: by 2002:a05:6402:c15:: with SMTP id co21mr5723690edb.115.1613678419330; Thu, 18 Feb 2021 12:00:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613678419; cv=none; d=google.com; s=arc-20160816; b=A2ke2muEvgsfVOKg88sHHBCuh/IC65yPz+1XX27M59K7tYLoThsOiXrc0OhegZUlV3 1SiWQbx8qZ7J7mHbWv9gPiWJgMKVZN9tP2+PiQfYtji6strXdguhNiH2f6aLTbtyH1Op jIC3/QTepvXePceDqW53RSiB89o8m897zkHp4AR3cZWVGiP5Ai9yOg3D6jWe9tnzcX7p a5D8ADQvCbbNb/ewZgxI3ZGutxbOm/L+ZcsUck7Wzd9yKaZQ+KjPDPqX1+Y5OlYkwXvF 5WT9oOQ0jxCpnu2rPKR0CnzWhwvEst0ktk6XGzysFB8Cn9/fQD5njWYpdrETJ1Wtut4q H9Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vygaJnkCrf2utJ2yVAPW3e/AXlZKJINR3eabxamaN58=; b=sGlP1B/tjIAqmbrVpJSVowak0zsUGaS71v5KSKSQF6DLcqvfFZ9++sPMSC5z1jJfUM pwKAY+b4feMh9eLe7R1WkV8LmDM12vhEqce7g7xH1t7xUhcDpZfyD7aP7dzEdPIgkQNB sPIFhXqHPgtUWv3GEa3j2v6/7Pyqy4eeoeSX0Nu/M1ia9stDDfwt05iVFeG3tT0VbSJ/ Bgw4+FDdZswzIjJBPA9zEtOP/oAzleqtJlXSYhcZzVvH7eLeD2aC/YAnZOpYcP68phDH WUeEdH1lUuV6LE59wZ1joD+rr1rJz/qaO6HCPS4x9hmDKX6m655e6XpQf8/s8VCtKqJT PkGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PKUjImZY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si4407925edp.42.2021.02.18.11.59.55; Thu, 18 Feb 2021 12:00:19 -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=pass header.i=@kernel.org header.s=k20201202 header.b=PKUjImZY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232046AbhBRT5s (ORCPT + 99 others); Thu, 18 Feb 2021 14:57:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:59634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232642AbhBRTkX (ORCPT ); Thu, 18 Feb 2021 14:40:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7A4C464E2F; Thu, 18 Feb 2021 19:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613677181; bh=tBD1P8c4rgp4gpHNuXKB5YTNOT6ZZZi8PeaBJ/uIre4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PKUjImZYWKoxUO3W375W+FVN5TiewBliAora8HsCmorQnlhIYk9Pg0Tob/NOOIh9W PKEQGqB2Mieg9DhOjFv/T3oMxdtc6G8yu4FZPG0G4pe3RbOS4X2VcMz0xMNz35sQqy fQ0h0AizuhA92/GVQxjNUsJWE5CNGlvyvd6auPzqgP81H98ianQqbDH+pwhFqOdyP0 q59cVB8pjFHp2noKlU6EFxst/f5ku5EAciEc4k2LnfrQRfprQ7FqfGp1Nh+Q2lAqZd EiJWMXVL33fi+enI3DgSU2CikaKiTwpgcuC/AsycUuWkdPMT4yNMtg/EE148psVt9j 4v77F1+D9VrqQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 43E7D40CD9; Thu, 18 Feb 2021 16:39:38 -0300 (-03) Date: Thu, 18 Feb 2021 16:39:38 -0300 From: Arnaldo Carvalho de Melo To: Nicholas Fraser 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 Subject: Re: [PATCH 1/2] perf report: Remove redundant libbfd checks Message-ID: References: <94758ca1-0031-d7c6-6c6a-900fd77ef695@codeweavers.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94758ca1-0031-d7c6-6c6a-900fd77ef695@codeweavers.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Feb 16, 2021 at 03:37:20PM -0500, Nicholas Fraser escreveu: > This removes the redundant checks bfd_check_format() and > bfd_target_elf_flavour. They were previously checking different files. you forgot the: Signed-off-by: Nicholas Fraser I'm adding it, ok? I'm also addressing Jiri's remark about spaces surrounding | - Arnaldo > --- > tools/perf/util/symbol.c | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c > index 492c873713cc..08f6f57c84fd 100644 > --- a/tools/perf/util/symbol.c > +++ b/tools/perf/util/symbol.c > @@ -1586,15 +1586,6 @@ int dso__load_bfd_symbols(struct dso *dso, const char *debugfile) > if (section) > dso->text_offset = section->vma - section->filepos; > > - if (!bfd_check_format(abfd, bfd_object)) { > - pr_debug2("%s: cannot read %s bfd file.\n", __func__, > - debugfile); > - goto out_close; > - } > - > - if (bfd_get_flavour(abfd) == bfd_target_elf_flavour) > - goto out_close; > - > symbols_size = bfd_get_symtab_upper_bound(abfd); > if (symbols_size == 0) { > bfd_close(abfd); > -- > 2.30.1 -- - Arnaldo