Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp341630rdf; Fri, 3 Nov 2023 02:15:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGgYqEz6+gGufgi/snP0A0NrfubiSqLp4ineNf5ZSjR3sf4xYM3bUuqxHXlAXd7tUcP+On X-Received: by 2002:a05:6a00:1414:b0:6b4:231b:a45c with SMTP id l20-20020a056a00141400b006b4231ba45cmr21528647pfu.26.1699002903150; Fri, 03 Nov 2023 02:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699002903; cv=none; d=google.com; s=arc-20160816; b=CT/N8LHqhXe/iVc9uugVXBNBqE5H9ucAsEYf9HZvgRKIOvOZvtMaKxva3qjL5jYD1u kAzChGY57P666CYMYT977ZNX8OO8aHanb8MQy//iidXi/9lzQFv67fP0atgEAQtqQw60 POfa2rVDLqZWh9brUaLyjRiMkJnz9GdhJvC63SKORyncTEoAQGTFZs7TEmP0eHJdvAO3 XC7eSMuZgWl0iim28d+aRiFzjOULjTOlussS7XPevTEIOCLnuo+eIow5vzdzxO7iixqE erE47dcB4lH9UeaScSm2Nqw7/XPw6yFMgylcoOh0B/Pis8dHe7BA+lrU+7cq7sva8D+H 8cOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=QT4TMciSq0Wxs89Z/9081HVT2aVNq5ODYaVyH3AvUPs=; fh=OjBFSETsC2uucb1eBuZok9EtziZuMdwjJVHy5vAVbLs=; b=sB1XuKKzZL11KRtrvC5HdJgEIYDIQcUXln/20HdwPTzXYavsL+506k/J9keFWA2etB 9LyDuXX9H6nOvtjJmjgFhMrRsfFzk2HPdDnQCNulVdwM1/mmLdlBCze5e7RAXENjugK9 1ZPq1zIQXpjIdskWB+Ky4s4+qmrDtri94UObmLEkVaLM9DK3/AGegNIRt5yN5hwb0c0y 4fUgG61ZxY97b/anw7M8TzD7BVB9kACJX2FVIoRWSbpYFb/uDw9BN4czCrvkoVgl2kHb dQUKvPREgg2OphAszfPMpD2ScLSGu6Tf31dQQpfZGpuWJ6499O5BJ7JduXGpOXdt6Ol3 sz5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s16-20020a63d050000000b00573fe48c908si1224259pgi.128.2023.11.03.02.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 02:15:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CD4C381B4ADC; Fri, 3 Nov 2023 02:15:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346916AbjKCJO4 (ORCPT + 99 others); Fri, 3 Nov 2023 05:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346858AbjKCJOy (ORCPT ); Fri, 3 Nov 2023 05:14:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 592031AD; Fri, 3 Nov 2023 02:14:47 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BE07B2F4; Fri, 3 Nov 2023 02:15:29 -0700 (PDT) Received: from [192.168.1.3] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C1CB63F64C; Fri, 3 Nov 2023 02:14:45 -0700 (PDT) Message-ID: <9e3355e0-f0d6-5f82-d2f6-b7e84bda996c@arm.com> Date: Fri, 3 Nov 2023 09:14:45 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] perf test: Remove atomics from test_loop to avoid test failures Content-Language: en-US To: Nick Forrington , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Arnaldo Carvalho de Melo References: <20231102162225.50028-1-nick.forrington@arm.com> From: James Clark In-Reply-To: <20231102162225.50028-1-nick.forrington@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 02:15:01 -0700 (PDT) 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 > --- > tools/perf/tests/workloads/thloop.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tools/perf/tests/workloads/thloop.c b/tools/perf/tests/workloads/thloop.c > index af05269c2eb8..457b29f91c3e 100644 > --- a/tools/perf/tests/workloads/thloop.c > +++ 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