Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp790433pxb; Wed, 13 Apr 2022 12:25:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyBD9KR+/HjiHPBfY78s17Q3kG3cqlZP6hIYK7367wltMGIL07M/0zbQjNmv53gsq2sT0/ X-Received: by 2002:a17:903:22c6:b0:154:4156:f397 with SMTP id y6-20020a17090322c600b001544156f397mr43941604plg.29.1649877924950; Wed, 13 Apr 2022 12:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649877924; cv=none; d=google.com; s=arc-20160816; b=Kz7SrRjYc2c547M1teF2h5YUPGofkSsdpj9/+vCzGPWFf/dLy3mMEZkn7AVIn6e5j4 OwDy4pz34i/T+NA3g7F3TIOU9jx9bM3jjbuPKnRcoQ9Ps8gVLcVW1KeBz56lkBG76dpK puuq0cv0QTYYoCFfcBc8zN2XgHNo3fMNIA4Q+v6s82fQf0C299o5fxjgS3kPeTakdg6V LReg1UxWqOO3vR73zqgPFR6tPmqmY04SOD6JWjbznN1ZdW7BRSwBTG48oxprFCAZIBnN oagGC6y0VNsCZZafo2sIGGIaePGrNL48PGwtn+SFkBXlMR8C92D1VabL4wjAtr5TpiOR uawA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:references:to :subject:from; bh=7Z+96CofyNG7AfqFxxE0PfkExM5fZRaKVx4Ekz3teS8=; b=BnxV++gDY7pxlzHNbGBQw+VOAbiitcdbfFC+v4AuAt4jHIJJQmuDua2qEpJsW2YWgy a4Suyybrcdoj+ZltpviHtsnsReaiMQh6GexWhp+GNGEBbJ4E5cMIxXYxOz3DoifkVZiV /He4uhOPr0GmnfvRlJcJdqwcAfvZVfnxutZxtIXxChnQQ16H6APbwFEbqHbhTgbakxlH OcvFP4YIoMa4OBzIkIiGttQeY5ocZin5I/lryDJVWFHUWD6i+9Bk6wlT28HNjfxA7woP Str+lUGp99YrhrFwm4vAr6u9FJx2W0cb0TWsos85s8PJtGVqx25bjT5tHuu3FnXMilvS fckQ== 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 q15-20020a170902dacf00b00155e8c68779si1596230plx.601.2022.04.13.12.25.00; Wed, 13 Apr 2022 12:25:24 -0700 (PDT) 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 S237160AbiDMRTx (ORCPT + 99 others); Wed, 13 Apr 2022 13:19:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233723AbiDMRTv (ORCPT ); Wed, 13 Apr 2022 13:19:51 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 395126A076; Wed, 13 Apr 2022 10:17:29 -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 D6C5D1576; Wed, 13 Apr 2022 10:17:28 -0700 (PDT) Received: from [10.1.33.136] (e127744.cambridge.arm.com [10.1.33.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 26DA13F73B; Wed, 13 Apr 2022 10:17:24 -0700 (PDT) From: German Gomez Subject: Re: [PATCH] perf arm-spe: Test memory samples To: Leo Yan , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220413010221.81332-1-leo.yan@linaro.org> Message-ID: <21978774-356b-bc08-ba68-80d877e2b6b4@arm.com> Date: Wed, 13 Apr 2022 18:17:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220413010221.81332-1-leo.yan@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 13/04/2022 02:02, Leo Yan wrote: > Add a new test to verify the Arm SPE synthesized memory samples with > 'perf mem report' command. > > Signed-off-by: Leo Yan Reviewed-by: German Gomez Thanks for the patch. There are some tests for perf_event_attr fields. We added one for SPE recently [1], but it's not checking the sample_type attribute yet. We could update it from our side and send another patch, to test the DATA_SRC bit is not missing. [1] https://lore.kernel.org/all/20220126160710.32983-1-german.gomez@arm.com/ Thanks, German > --- > tools/perf/tests/shell/test_arm_spe.sh | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/tests/shell/test_arm_spe.sh b/tools/perf/tests/shell/test_arm_spe.sh > index e59044edc406..b36125e127eb 100755 > --- a/tools/perf/tests/shell/test_arm_spe.sh > +++ b/tools/perf/tests/shell/test_arm_spe.sh > @@ -62,6 +62,18 @@ perf_report_samples() { > egrep " +[0-9]+\.[0-9]+% +[0-9]+\.[0-9]+% +$1 " > /dev/null 2>&1 > } > > +perf_mem_report_samples() { > + echo "Looking at perf.data file for reporting memory samples:" > + > + # Below is an example of the memory samples reporting: > + # 20.71% 1696 27 L1 hit [k] el0t_64_sync_handler [kernel.kallsyms] ... > + # 17.21% 1903 20 L1 hit [k] el0t_64_sync [kernel.kallsyms] ... > + # 8.52% 897 21 L1 hit [k] ksys_read [kernel.kallsyms] ... > + # 0.12% 16 17 L1 hit [.] 0x0000000000004ce8 dd ... > + perf mem report --stdio -i ${perfdata} 2>&1 | \ > + egrep " +[0-9]+\.[0-9]+% +[0-9]+ +[0-9]+ .* +$1 " > /dev/null 2>&1 > +} > + > arm_spe_snapshot_test() { > echo "Recording trace with snapshot mode $perfdata" > perf record -o ${perfdata} -e arm_spe// -S \ > @@ -79,7 +91,8 @@ arm_spe_snapshot_test() { > wait $PERFPID > > perf_script_samples dd && > - perf_report_samples dd > + perf_report_samples dd && > + perf_mem_report_samples dd > > err=$? > arm_spe_report "SPE snapshot testing" $err