Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5347547rwb; Mon, 14 Nov 2022 03:20:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/Ylmti6X1BUwo/P9MSKZR4PbsNvagZ1aIdovzKJfBSfJdtesXaoZ2mT3l0Iwocl5CvBnf X-Received: by 2002:a05:6402:1f0e:b0:461:4059:eb3f with SMTP id b14-20020a0564021f0e00b004614059eb3fmr10491874edb.157.1668424857161; Mon, 14 Nov 2022 03:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668424857; cv=none; d=google.com; s=arc-20160816; b=Y2HljqBTXl946swkUtDYNzStbIQOdesD1ka1o0FcbpYDOwvWVpEt7//0YPeVxzhYLK buyh4XuBlpLWJQ8+5kzXZt1eDsTKTqU2fIy7rJNoSqKjEzLT91llZIe61bo64RK4FWqN hfVXwpBigvuv4EuCd4JMSkdaGI/loqTPqs2mcTmXSTGi91toSjDSbgfy/+Aqr3DmneQi lTwnBl5DMIe8Suyj/1hJVQH75BTJU0Ug3XD9PfIqT5hHgHlFeCrwjw/EKqAnGuKWQJd2 /h7x5ahAVeBU/bnp/uTfI06tt9l8dEic+0LArF9QtPp7MRp3EWgzBZ2WPu2CtdsWOIYN lDdw== 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=euJVYaPFApIMSJhiFo7pfTX5B5xwI4rPAgAjIFuH+UA=; b=d6ObgchfNNxj2gfmXm/7PmfulfLBO5jOdn5Uo1Gg7eye6yyyE6CeP4Ux5dvuBtUqbh sm77pFrzymkEPqZyE5eps0PxzCd5LF56eXraLiHzHjCNc+Q7Z5RQ8PAK8StZAx4XKVAJ XR6V4NcvYV+APVihwh97k5U9992rMdBJ3r5kPuYHe9akDjnVNcef+kJfePOixbNcfixf VsF4yrVys109XIYWUvsKzktW0ukdQV7D3wSTv9m1kyduRmaqeePxifdnmcyFbAa30CqI ea9f9r0MwcWgY5ge4zKeLn6v8Ft3KfrmeA7VpOei0EzZw2W2i7y2Eucb2/S/dUztF4xH DFBA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne38-20020a1709077ba600b007877f3132d9si9037546ejc.438.2022.11.14.03.20.30; Mon, 14 Nov 2022 03:20:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235979AbiKNLQr (ORCPT + 89 others); Mon, 14 Nov 2022 06:16:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236088AbiKNLPw (ORCPT ); Mon, 14 Nov 2022 06:15:52 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5D5AE222B3; Mon, 14 Nov 2022 03:12:14 -0800 (PST) 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 73CA0ED1; Mon, 14 Nov 2022 03:12:20 -0800 (PST) Received: from [10.57.70.83] (unknown [10.57.70.83]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC80D3F73D; Mon, 14 Nov 2022 03:12:11 -0800 (PST) Message-ID: Date: Mon, 14 Nov 2022 11:12:09 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 06/12] perf test: Replace arm callgraph fp test workload with leafloop Content-Language: en-US To: Namhyung Kim , 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 , Athira Jajeev References: <20221110181920.84900-1-namhyung@kernel.org> <20221110181920.84900-7-namhyung@kernel.org> From: James Clark In-Reply-To: <20221110181920.84900-7-namhyung@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On 10/11/2022 18:19, Namhyung Kim wrote: > 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(-) Tested-by: James Clark > > 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 }'