Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp496036rdb; Thu, 2 Nov 2023 09:23:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmdgqhI+54HaaD1NaSn09SZ8fvr5DAUc+Sm7Kf/DYLyaDkrI0x3V86ZtLL41IJ11gJf/hp X-Received: by 2002:a92:c546:0:b0:34f:70ec:d4cf with SMTP id a6-20020a92c546000000b0034f70ecd4cfmr27325042ilj.8.1698942196714; Thu, 02 Nov 2023 09:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698942196; cv=none; d=google.com; s=arc-20160816; b=lTq3BojErFryUD01AYP3TO+S/G8juSqkbWRptE6GONM5yxVO32FG3f7u4mGsx9O+hl Wsnnkt7CUaRrRppsQPAhKn5lPiuUKQew2SEvJ0NqRy+CUyhIU1aMeoiIOugQvUgblnHZ ijyt5q2EEFZn2L6grq6d5SHJDQERE5KdyrqiJJCnCeNE+xB7aMAtdLz9vA1Ii0RchRSN rCYcs/LZTbGzfAkYsrAcRBK9d9r/+onhV3emnMWtmy7SUhi2NsY0IE+pm+FmUV49BFka ey6cVDV7j+Wav5zMRBu1NiEwgU6wPYHbqJA4rThULig5ZKL6s3b7s46zYlac8MN9wsGx hI0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6jO3i5ZHHx4eTXnBm2SQv30Sqe08v70jQSZj8afHIgE=; fh=KZwJI2IhX2NkYw3UI/ow2q4exUfD2a8wOZqtpxoZpb8=; b=kiWPCOYWAVnDTCXOUa2HUeKBiYs5sRUBnV+7QN4Uie67wQEtd5+hJUAj1iG7dGPZnd wGbfskGodj9LW5rz2OqqF4i+xjh5n6qIctuB5fRq8KLkTL/NB0NSWgsvOda/fbhft1cg 6hqyfpv9yaZgHtyH+ZU2uBv9VzekrzCyL3z25RzBHgY4ashv1UVfAhMAxcWQ4eS+9UXi 1YuV54wZOufv68lH96lZ9nP4u4E01163U0UMKaklNG31LyIFeSHiRkkGXXwLTZZ9Doto 9r9iqbk4GiyI9nVNa2EcMTX65Ci6EZf/weL4b5IUVMUtPpUO1jVAxzsKj/tE/W7LyZGu wTAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bn21-20020a056a02031500b0056f8fdb4430si2356030pgb.893.2023.11.02.09.23.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 09:23:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 2D8BE80DB704; Thu, 2 Nov 2023 09:22:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347613AbjKBQWw (ORCPT + 99 others); Thu, 2 Nov 2023 12:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234506AbjKBQWv (ORCPT ); Thu, 2 Nov 2023 12:22:51 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8484312E; Thu, 2 Nov 2023 09:22:48 -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 9205E2F4; Thu, 2 Nov 2023 09:23:30 -0700 (PDT) Received: from dsg-hive-n1sdp-01.. (dsg-hive-n1sdp-01.cambridge.arm.com [10.2.2.18]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D379A3F738; Thu, 2 Nov 2023 09:22:46 -0700 (PDT) From: Nick Forrington To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Nick Forrington , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Arnaldo Carvalho de Melo Subject: [PATCH] perf test: Remove atomics from test_loop to avoid test failures Date: Thu, 2 Nov 2023 16:22:24 +0000 Message-ID: <20231102162225.50028-1-nick.forrington@arm.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 09:22:59 -0700 (PDT) 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) -- 2.42.0