Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1060199rwb; Thu, 10 Nov 2022 10:38:03 -0800 (PST) X-Google-Smtp-Source: AMsMyM5jQfUko3+A0nFx6Vh+AeLOm41Sxtc5+kWrm85NU5YcEJkD5K+mq1mOeFVOYSODnYP3hBvK X-Received: by 2002:a63:5119:0:b0:46f:be60:ad82 with SMTP id f25-20020a635119000000b0046fbe60ad82mr3091845pgb.34.1668105483667; Thu, 10 Nov 2022 10:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668105483; cv=none; d=google.com; s=arc-20160816; b=AWXTEcijNUcs6E+1p067AcDHrfUPySjy3iyx4o/1O1nQYNsbzkoibgWpNPpvFcJqyx iOw01ZPmrnND5VGglVKFBp6gvF/9Ips2Uv8S6890233R3/TW1NCg7NPWMXO5C+eD66nA lCyv5NTTqgUa9dCGqoOR0rtp0wQMTpKpAdfHvHub528QCsdJgSKZuzZAq89EUt6F8QWH HQaTVw8AMCNEY+B67tKhNOHm7MGBngn9bmnO5VnZozE/ZgupoPbN7dYYa7HKwNz9VJhd UdiHD1JpBC9zocce3tJqfDxIk81tedQnSx9Fh5lrXrYuqASTVZmXE/meKT2e7SAvW9HP 3S1A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=8W1IE2xF3dtxcNrj5t79DBInf6fMe+hYp9ym1CIb+t0=; b=ynOTALRzNi/WAlwqfZYS4nHGfEzDcPrU5aWxsEUy60xfgWlJCPyw8cuHZMuz7PkPnm 7l2hJePNz/teDjCYAZoA4o69xHZZvgSR/AFlKLi49DYVo5lWZvvG+2GyX6OWC8/ws03o 0wLgYBrtDX0lZ/XKtI411fzNCB9qyZintw9tBsIkfevyyE0AcDLacbJ2t6M3YItRpBZA HGSX1IX4+04F5HV0OWCwfTI27oj4BPlple7NKDPVQlHBwxqXjYSpnzVbWKst2b7CewlS thZYM1Z6tpgfgj2jB7IXs1GVBP/OzsmJbj84ZdGFarrqC9GrAI4FIBF0H8Ohw1Poc4YF qfkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YhqlzF1L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a170902934600b001873af01dcasi41847plp.85.2022.11.10.10.37.52; Thu, 10 Nov 2022 10:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YhqlzF1L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231912AbiKJSTu (ORCPT + 92 others); Thu, 10 Nov 2022 13:19:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231860AbiKJSTl (ORCPT ); Thu, 10 Nov 2022 13:19:41 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 933F14C25F; Thu, 10 Nov 2022 10:19:31 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id 4so2180477pli.0; Thu, 10 Nov 2022 10:19:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=8W1IE2xF3dtxcNrj5t79DBInf6fMe+hYp9ym1CIb+t0=; b=YhqlzF1L0IAbbvz6hY9m89EYo+kFy9yEK0/JcmBQzgk1D3UCS7dwZom64Ufaikv4MZ 0ZZ361jjEKVhtwdtTrTQWQ8KTc6UWGJrfoJ4aZnt0SxD5yHPondQPsfd2y5XLW9jvXW1 v2RRg3YAkEIOHks4wLk8rqJjFfwoZWYXHxiYf5J5DaHpoI7f/PkfcpoL8sAkbg1jhIPI wihJMKrx2ZLsy9fqqfclcsPVU9fEeQAUK5rIbCvYM4isymCMkgwOgJyuMhIyDH7xCJ1j 7kHUxFRIiEXCRQJWHWrJDuBbzlP+xp3XJYDfCyvE9N6CNegEaYOtZLrfpOum252nv8Od N8zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8W1IE2xF3dtxcNrj5t79DBInf6fMe+hYp9ym1CIb+t0=; b=eqF6FaaLrM6VaRHawIFcZyJ320cFdNuQQ1Q268K/XcIvi4gsYLMKW3CTheSV6coN1p OmiYOv27BNHMzEa5czNIZuzwtMsf+dFaq8L90cHtsz3OUxFX0oeGOS2rbpU/7icW1MqF C7Sm+mLZSlgUCrVpaS9JotFUCXO1v4IPTWxCEYZfJLDkBfVKaLrKyllvPbayI56XiKnM seApYCm2IfWlaBLZ1oPmOrVKb1Dmx4y45kZA3jXvpzwX+m23C+2473IRkvwj2BwFqt0b +exPyFPJ9OhSqYcZvDaY70ez0LAGVjj5UkGBUlvo2fAOTT/WIH+ytEQtFu8OyKrztO34 UIgw== X-Gm-Message-State: ACrzQf0mi3qPRu4EMz+KO2eaJwOpQhH/NJQxVE4ZR8JOoNzgifWHfME8 Rg51fFyQjkC6rWPr3gyH6Ok= X-Received: by 2002:a17:902:744b:b0:187:12cc:d6f1 with SMTP id e11-20020a170902744b00b0018712ccd6f1mr1630691plt.63.1668104370928; Thu, 10 Nov 2022 10:19:30 -0800 (PST) Received: from youngsil.svl.corp.google.com ([2620:15c:2d4:203:12cb:b694:b3d8:467c]) by smtp.gmail.com with ESMTPSA id e9-20020a170902784900b00183e2a96414sm11518744pln.121.2022.11.10.10.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 10:19:30 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Leo Yan , German Gomez , Zhengjun Xing , James Clark , Athira Jajeev Subject: [PATCH 06/12] perf test: Replace arm callgraph fp test workload with leafloop Date: Thu, 10 Nov 2022 10:19:14 -0800 Message-Id: <20221110181920.84900-7-namhyung@kernel.org> X-Mailer: git-send-email 2.38.1.493.g58b659f92b-goog In-Reply-To: <20221110181920.84900-1-namhyung@kernel.org> References: <20221110181920.84900-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So that it can get rid of requirement of a compiler. Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim --- .../perf/tests/shell/test_arm_callgraph_fp.sh | 34 ++----------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh index ec108d45d3c6..e61d8deaa0c4 100755 --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh @@ -4,44 +4,16 @@ lscpu | grep -q "aarch64" || exit 2 -if ! [ -x "$(command -v cc)" ]; then - echo "failed: no compiler, install gcc" - exit 2 -fi - PERF_DATA=$(mktemp /tmp/__perf_test.perf.data.XXXXX) -TEST_PROGRAM_SOURCE=$(mktemp /tmp/test_program.XXXXX.c) -TEST_PROGRAM=$(mktemp /tmp/test_program.XXXXX) +TEST_PROGRAM="perf test -w leafloop" cleanup_files() { rm -f $PERF_DATA - rm -f $TEST_PROGRAM_SOURCE - rm -f $TEST_PROGRAM } trap cleanup_files exit term int -cat << EOF > $TEST_PROGRAM_SOURCE -int a = 0; -void leaf(void) { - for (;;) - a += a; -} -void parent(void) { - leaf(); -} -int main(void) { - parent(); - return 0; -} -EOF - -echo " + Compiling test program ($TEST_PROGRAM)..." - -CFLAGS="-g -O0 -fno-inline -fno-omit-frame-pointer" -cc $CFLAGS $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1 - # Add a 1 second delay to skip samples that are not in the leaf() function perf record -o $PERF_DATA --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! @@ -58,11 +30,11 @@ wait $PID # program # 728 leaf # 753 parent -# 76c main +# 76c leafloop # ... perf script -i $PERF_DATA -F comm,ip,sym | head -n4 perf script -i $PERF_DATA -F comm,ip,sym | head -n4 | \ awk '{ if ($2 != "") sym[i++] = $2 } END { if (sym[0] != "leaf" || sym[1] != "parent" || - sym[2] != "main") exit 1 }' + sym[2] != "leafloop") exit 1 }' -- 2.38.1.493.g58b659f92b-goog