From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75556C001B5 for ; Fri, 2 Sep 2022 17:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P1dmkeuhAwSUmr4smU6HyuuKlHunaC53ZUsLQ0FpzGg=; b=BzY7IewUshg6Iu i5/H2X+8AfWIUqh2fr5yKvewCZEIPV+oHaijOLfSKAFwRxyZBEBmCyrkebimGdaC2fZFR1hbIKTdh Rj1mJCw5zvPswoy+JhFNZIFcC1zgCKDKmwad0yh7/iwhltmDAVEiiqWmEsZkDDiserwHDOzzuWA7l WYKD44rBUUwGuUhv52w1UVdZo+01XnYjG2sVgpVk9Q3ARCuG54gOo3HVpFYB6VaajrlkvaZ/wJPSe sVqM/Zvn4JayjyxDjKwJ3FHyPJQYzAgIZdyZ4YY7GevDA1GHQnVCc/GKc4b9EcfIDMqBS2HGYm3LE xOQ61nYxHkAALCYSryug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUAkn-008Pra-Tb; Fri, 02 Sep 2022 17:46:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUAkl-008Pqj-RF for linux-arm-kernel@bombadil.infradead.org; Fri, 02 Sep 2022 17:46:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=q4Fi6DfUVrU+JAkk9PXayG+Z4QwYBpklvOkuWiAs/Rc=; b=rlwnINC3BpVroFfV/YJZt3T/f/ bK21txSxkrxq4LmArAIoSSl+PSzp5SCjPOttmKWL1OKN9fzA+x8R81mSo7U4jay3087diQq/7yWi0 7eWogtTXgplUzWIMtSpRjpg/m/EoFCEgdz/YvOjyIswqeMkSMQKZ0AewNeCb5S50qthLxDxgskwd6 v8X/EzpFOPPTZPS1EYzAZ60s434Sr+7SxMKubdUrXQzwpeLn1MHc04oRmR/DRP3zD6FCAYYrbYSLS nVg2XKZl2P7GJX5Zg0qJH3mFRU0hxd22A2jkuLx2z6MJ0jVceQ2qc488BkUVf0gXEt4eRLpjCAgUm JFVRj96Q==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUAkl-007DPG-A7; Fri, 02 Sep 2022 17:46:51 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 64F9F404A1; Fri, 2 Sep 2022 14:46:47 -0300 (-03) Date: Fri, 2 Sep 2022 14:46:47 -0300 From: Arnaldo Carvalho de Melo To: Anshuman Khandual , Stephen Rothwell Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, mark.rutland@arm.com, Robin Murphy , Suzuki Poulose , James Clark , Ingo Molnar , Namhyung Kim , Thomas Gleixner , Will Deacon , Catalin Marinas , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V7 6/8] perf/tools: Extend branch type classification Message-ID: References: <20220824044822.70230-1-anshuman.khandual@arm.com> <20220824044822.70230-7-anshuman.khandual@arm.com> <9b1a8ebd-0562-f104-7439-308282f7fb52@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Fri, Sep 02, 2022 at 02:31:34PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Sep 01, 2022 at 10:37:24AM +0530, Anshuman Khandual escreveu: > > On 8/31/22 02:41, Arnaldo Carvalho de Melo wrote: > > > Strange: > > > > > > 75 8.89 ubuntu:20.04-x-powerpc64el : FAIL gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04) > > > inlined from 'branch_type_stat_display' at util/branch.c:152:4: > > > /usr/powerpc64le-linux-gnu/include/bits/stdio2.h:100:10: error: '%8s' directive argument is null [-Werror=format-overflow=] > > > 100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > 101 | __va_arg_pack ()); > > > | ~~~~~~~~~~~~~~~~~ > > > > > > > Indeed. But this new code block here looks exact same like the previous and existing one > > i.e with branch_new_name() and PERF_BR_NEW_MAX. The complain is that - '%8s' directive > > argument is NULL. This warning might just be a false positive [1], because of a compiler > > problem on powerpc64el ? But please do let me know if something needs to be changed here > > to avoid this warning. > > > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90036 > > > > So, I tried not returning NULL in the functions that are ultimately > called, but that didn't help, so I'll try just disabling that specific > warning for this specific file. Got it building: 23.68 ubuntu:20.04-x-powerpc64el : Ok powerpc64le-linux-gnu-gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 BUILD_TARBALL_HEAD=b0f700972d9d0c9b8e73f69ccf0e56d74c580d71 With: >From b0f700972d9d0c9b8e73f69ccf0e56d74c580d71 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 2 Sep 2022 14:35:26 -0300 Subject: [PATCH 1/1] perf build: Avoid false positive with -Werror=format-overflow= with gcc 10.3.0 on powerpc When building with gcc 10.3.0 on powerpc this is happening: 75 8.89 ubuntu:20.04-x-powerpc64el : FAIL gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04) inlined from 'branch_type_stat_display' at util/branch.c:152:4: /usr/powerpc64le-linux-gnu/include/bits/stdio2.h:100:10: error: '%8s' directive argument is null [-Werror=format-overflow=] 100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ Looks related to: [10/11/12/13 Regression] false positive: directive argument is null [-Werror=format-overflow=] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90036 So lets disable this just for the util/branch.o file. Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robin Murphy Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Link: http://lore.kernel.org/lkml/YxI99uLvpgAZjm2r@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/Build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 8fd6dc8de5210336..20a5524e88a04d44 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -223,6 +223,10 @@ CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))" # avoid compiler warnings in 32-bit mode CFLAGS_genelf_debug.o += -Wno-packed +# avoid false positive when building with gcc 10.3.0 on powerpc +# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90036 +CFLAGS_branch.o += -Wno-format-overflow + $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c $(call rule_mkdir) $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \ -- 2.37.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel