Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp534361rdf; Tue, 21 Nov 2023 09:05:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPjXIS+RxcTsGu6koPR+1rRudvDrp85wCNE82pOcOLI8mdNdEEphRLswxtQJPpSxLUWkrB X-Received: by 2002:a05:6a00:1405:b0:68b:a137:3739 with SMTP id l5-20020a056a00140500b0068ba1373739mr10337568pfu.4.1700586306769; Tue, 21 Nov 2023 09:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700586306; cv=none; d=google.com; s=arc-20160816; b=uZnO7qBcYBOBekLLopHnEsi/PrdiOZ6pjxrNiakpyYTzeskHyCKAdua6KJLXA+gqWH gpxXNqQYp2o1+/zzTpK5VjylG6aflGtYyrjVHP59Kgb63mIqcYr33uk0GvOuzt1kjwma DhZKy4dCJwPEMIT7eoFfzU/4zI/FVi4DSHnfPR8AmYErl+bcFNees4dLKXGBltKZnoop X4S9VbFJQpCW+J7iiUuQqLZslTWbjWP1FoHThKMocjV/tfr9A2PYlcOYa8QS87OqhsaX 5nRJ/46Muv6NdHscqE1Sxw3j+ggyDbptJrGT+ukKvwR4PJ+i3GBeQmZ80C2dlY8a0Q6/ mfkg== 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=Lh9KxXOBUrQDA+Rp4BGBqODttO4/1kEAzW0TYtHfTCM=; fh=3RGpFD5JxBh090mgv5pSWGFXpVowaT+WljbaFlxap+k=; b=M5g7ib3AkAI066wZJUpYNuwN22Bvu4qMmOn4+y9ly0NVAUqFmsMa8bWsBXvdWVo05g Sm46wbrq3JA6A4VWBLFa/WhvVMtC31yIWSpfmnb/If3/Dv3z76qJHoTQ7awGA3iWpiK8 BhKWxX0zHjMSZqGKgrZTERfL6aKAbhoD6Nh1i3PmRLcMeFdePhciOTbEx6/NWid5DZos 3wBYi8/SaS3wAr6WlI1eQYbIKKOVG9KorVQi2U83Au4hsT4adZ8kWqesOPhDfrZckiGG E2wTQkNc8snoaF7igzNVNhSa6Myg1wg2RcuwaLqtxRzezYYsbE7ZAoPbw6U9ttl3n4Mq zNVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y94UqoRH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id w9-20020a631609000000b005a9fde46fa0si10421837pgl.130.2023.11.21.09.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:05:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y94UqoRH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7ABC080239E3; Tue, 21 Nov 2023 09:04:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233840AbjKUREf (ORCPT + 99 others); Tue, 21 Nov 2023 12:04:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231178AbjKUREd (ORCPT ); Tue, 21 Nov 2023 12:04:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AB4712C for ; Tue, 21 Nov 2023 09:04:29 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49119C433C8; Tue, 21 Nov 2023 17:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700586269; bh=o2lje6MLDqWiG8m5cmgUnmkPV9kdCM+y2t1aBGDhWPo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y94UqoRHkQKyT5snXO0zL0cPLp27Whhzi57swkI35O5TtB6q4bKXBNqhbs5SvmZJB by9FFd97dtah0xc3DfQ0ViQCQYpI9c5xwEjNE4yhdG7071a3XmTSknkdfiYfHgtZyM BdV/Rmo/4vYAbqWfKjOw5BWYc5JRahNpq+FaoiK8gcIm3ff5VgpxQoSVcJ6bHDsRP7 uiXgqvpW4VAoqVZXXdVBXxiFz9WRh9apr1KMfD54qNy5y+BKu3Wfcz6SouVYGg2x4f 6OfQevim5IEEFt/1Nnus3bCgBsDSpXoGVA9PeGIlCuvMjKXPOZlvr40+DLwBWHxoBU 3MuftqI16U5mw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D280640094; Tue, 21 Nov 2023 14:04:26 -0300 (-03) Date: Tue, 21 Nov 2023 14:04:26 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: Nick Forrington , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Arnaldo Carvalho de Melo Subject: Re: [PATCH] perf test: Remove atomics from test_loop to avoid test failures Message-ID: References: <20231102162225.50028-1-nick.forrington@arm.com> <9e3355e0-f0d6-5f82-d2f6-b7e84bda996c@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9e3355e0-f0d6-5f82-d2f6-b7e84bda996c@arm.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 09:04:52 -0800 (PST) Em Fri, Nov 03, 2023 at 09:14:45AM +0000, James Clark escreveu: > On 02/11/2023 16:22, Nick Forrington wrote: > > The current use of atomics can lead to test failures, as tests (such as > > tests/shell/record.sh) search for samples with "test_loop" as the > > top-most stack frame, but find frames related to the atomic operation > > (e.g. __aarch64_ldadd4_relax). > > This change simply removes the "count" variable, as it is not necessary. > > Fixes: 1962ab6f6e0b ("perf test workload thloop: Make count increments atomic") > > Signed-off-by: Nick Forrington > > +++ b/tools/perf/tests/workloads/thloop.c > > @@ -7,7 +7,6 @@ > > #include "../tests.h" > > static volatile sig_atomic_t done; > > -static volatile unsigned count; > > /* We want to check this symbol in perf report */ > > noinline void test_loop(void); > > @@ -19,8 +18,7 @@ static void sighandler(int sig __maybe_unused) > > noinline void test_loop(void) > > { > > - while (!done) > > - __atomic_fetch_add(&count, 1, __ATOMIC_RELAXED); > > + while (!done); > > } > > static void *thfunc(void *arg) > Reviewed-by: James Clark Thanks, applied to perf-tools-next. - Arnaldo