Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp960020pxb; Wed, 16 Feb 2022 08:00:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLhMFJJ3e88C99weff4Q7nj5Lfmv6rs7brFgk+JkwfMDB9lnj++MymJu7fa0DPQHI6eTZZ X-Received: by 2002:a05:6a00:de:b0:4e0:ca1a:9f07 with SMTP id e30-20020a056a0000de00b004e0ca1a9f07mr4015197pfj.11.1645027223612; Wed, 16 Feb 2022 08:00:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645027223; cv=none; d=google.com; s=arc-20160816; b=XcOOmQQq13oCQfnHdFy8Ql0x/7G8EYfQMhbcltspJ7lhR4fblNLfT+nvoXL5uDBgNx SKQvmeStQOzZLmb16soSAqCrCo9PvAC0FhknTy4UodvINU0RsIjWTeLDxNrRL1JsnjPL rnb3RmGCndNuvVKTpyr8CIl4+D7Xk57AsV7P7/mr+DW4jPgu+uIvQ4iAzXYup88VbOQK 7QQKaIRmjbjEF3ahbeR19gUQLmCdqETS5d+PuxfcmQlb9vUqly+gXPdChqNr77xgM5Dj HpgbW917bRTrEXXZHwInFHAjZ9WTCRWsm0IoE/hig5gpG2SYdkl2hfcjbH5MbzAmFq+g 9lQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FsY79Rj5ExpCEtAbcP6bX6IarCUhF+TEAvR5SlJ7AFU=; b=bvzyEYp235zN7UyBobKink0u0nlf3PnQIYJ/traebbAeJPlQwIIlYcFsqGrIArJg8o pPcPsOhHUrAewnzVWWM/8jJQkcywJHOtoYL7FmQFpdV/tLtx+GRk+YnEaNVIXursusuk 0NoT7ZZ38vKRzAdN4PhN0EfT/W6a3DouuNtpGialXk0kP0LnYu2gPiXFigwPf0er8c+1 BgCjm0B3k4WtWBJF0ecEX6FRH1tYqwnqKFHN4QQ9noe515OfNSoQV28hgva9v10rPWFD BKsclfxUsRjZMEBFP28otLVi7E8Ym1OH5NJC44xGvvCwmz+Ty3A119ydZ15mhdJkuyJW pvHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h4fYWrQC; 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 y1si10009578plp.61.2022.02.16.08.00.06; Wed, 16 Feb 2022 08:00:23 -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=@kernel.org header.s=k20201202 header.b=h4fYWrQC; 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 S234576AbiBPNhI (ORCPT + 99 others); Wed, 16 Feb 2022 08:37:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiBPNhH (ORCPT ); Wed, 16 Feb 2022 08:37:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D396F1A76EA; Wed, 16 Feb 2022 05:36:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 892D4B81EE6; Wed, 16 Feb 2022 13:36:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02594C004E1; Wed, 16 Feb 2022 13:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645018612; bh=ZSkVb1slYA4F/pp9dzxY4tduW9grcjLC4TTtHzhDpuM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h4fYWrQCCOolWCrtXeDOPaIlXIxxB1dSAl1tLxSPrm5HxzV1eqJb0518M0U9tnxn6 1OGLMcVglnEyWOBv8QVpLFmTt0WGJg/FGRE6dRwuCrmSWOFaeG9QIqK3NCaefC8joj aCgDQHnFOjSEdZcE31JQWrOveNtc9bX9WziBEAylLh+HwRK2Z/3EGeMwm1TCnACaIu gn3as+6A1gEkF+Db5gfpdtdLZ60n3lpokYvxrMFMXAeZPXdEHSaDoqcASLyXIY6LA1 KZ5mFQpJ6hbObwDvl+zo1gHpiJa4E6gLXtrfsCb282+L/ae7cLJr3xI6APHI+4aWO4 /Vn5ZWq4/MW9A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 229E4400FE; Wed, 16 Feb 2022 10:36:49 -0300 (-03) Date: Wed, 16 Feb 2022 10:36:49 -0300 From: Arnaldo Carvalho de Melo To: German Gomez Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , James Clark , Arnaldo Carvalho de Melo , Alexandre Truong , netdev@vger.kernel.org, bpf@vger.kernel.org, irogers@google.com Subject: Re: [PATCH] perf test: update arm64 perf_event_attr tests for --call-graph Message-ID: References: <20220125104435.2737-1-german.gomez@arm.com> <622a42bd-69da-0df4-bbf3-7d21de77c73b@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <622a42bd-69da-0df4-bbf3-7d21de77c73b@arm.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Em Wed, Feb 16, 2022 at 01:17:56PM +0000, German Gomez escreveu: > Hi, > > Friendly ping on this perf-test fix for arm64 > I will include some quick test notes: Thanks, adding it to the cset, applying. - Arnaldo > Before: > $ ./perf test 17 -v > 17: Setup struct perf_event_attr > [...] > running './tests/attr/test-record-graph-default' > expected sample_type=295, got 4391 > expected sample_regs_user=0, got 1073741824 > FAILED './tests/attr/test-record-graph-default' - match failure > test child finished with -1 > ---- end ---- > > After: > > [...] > running './tests/attr/test-record-graph-default-aarch64' > test limitation 'aarch64' > running './tests/attr/test-record-graph-fp-aarch64' > test limitation 'aarch64' > running './tests/attr/test-record-graph-default' > test limitation '!aarch64' > excluded architecture list ['aarch64'] > skipped [aarch64] './tests/attr/test-record-graph-default' > running './tests/attr/test-record-graph-fp' > test limitation '!aarch64' > excluded architecture list ['aarch64'] > skipped [aarch64] './tests/attr/test-record-graph-fp' > [...] > > Thanks, > German > > On 25/01/2022 10:44, German Gomez wrote: > > The struct perf_event_attr is initialised differently in Arm64 when > > recording in call-graph fp mode, so update the relevant tests, and add > > two extra arm64-only tests. > > > > Fixes: 7248e308a575 ("perf tools: Record ARM64 LR register automatically") > > Signed-off-by: German Gomez > > --- > > tools/perf/tests/attr/README | 2 ++ > > tools/perf/tests/attr/test-record-graph-default | 2 ++ > > tools/perf/tests/attr/test-record-graph-default-aarch64 | 9 +++++++++ > > tools/perf/tests/attr/test-record-graph-fp | 2 ++ > > tools/perf/tests/attr/test-record-graph-fp-aarch64 | 9 +++++++++ > > 5 files changed, 24 insertions(+) > > create mode 100644 tools/perf/tests/attr/test-record-graph-default-aarch64 > > create mode 100644 tools/perf/tests/attr/test-record-graph-fp-aarch64 > > > > diff --git a/tools/perf/tests/attr/README b/tools/perf/tests/attr/README > > index a36f49fb4dbe..1116fc6bf2ac 100644 > > --- a/tools/perf/tests/attr/README > > +++ b/tools/perf/tests/attr/README > > @@ -45,8 +45,10 @@ Following tests are defined (with perf commands): > > perf record -d kill (test-record-data) > > perf record -F 100 kill (test-record-freq) > > perf record -g kill (test-record-graph-default) > > + perf record -g kill (test-record-graph-default-aarch64) > > perf record --call-graph dwarf kill (test-record-graph-dwarf) > > perf record --call-graph fp kill (test-record-graph-fp) > > + perf record --call-graph fp kill (test-record-graph-fp-aarch64) > > perf record --group -e cycles,instructions kill (test-record-group) > > perf record -e '{cycles,instructions}' kill (test-record-group1) > > perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2) > > diff --git a/tools/perf/tests/attr/test-record-graph-default b/tools/perf/tests/attr/test-record-graph-default > > index 5d8234d50845..f0a18b4ea4f5 100644 > > --- a/tools/perf/tests/attr/test-record-graph-default > > +++ b/tools/perf/tests/attr/test-record-graph-default > > @@ -2,6 +2,8 @@ > > command = record > > args = --no-bpf-event -g kill >/dev/null 2>&1 > > ret = 1 > > +# arm64 enables registers in the default mode (fp) > > +arch = !aarch64 > > > > [event:base-record] > > sample_type=295 > > diff --git a/tools/perf/tests/attr/test-record-graph-default-aarch64 b/tools/perf/tests/attr/test-record-graph-default-aarch64 > > new file mode 100644 > > index 000000000000..e98d62efb6f7 > > --- /dev/null > > +++ b/tools/perf/tests/attr/test-record-graph-default-aarch64 > > @@ -0,0 +1,9 @@ > > +[config] > > +command = record > > +args = --no-bpf-event -g kill >/dev/null 2>&1 > > +ret = 1 > > +arch = aarch64 > > + > > +[event:base-record] > > +sample_type=4391 > > +sample_regs_user=1073741824 > > diff --git a/tools/perf/tests/attr/test-record-graph-fp b/tools/perf/tests/attr/test-record-graph-fp > > index 5630521c0b0f..a6e60e839205 100644 > > --- a/tools/perf/tests/attr/test-record-graph-fp > > +++ b/tools/perf/tests/attr/test-record-graph-fp > > @@ -2,6 +2,8 @@ > > command = record > > args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 > > ret = 1 > > +# arm64 enables registers in fp mode > > +arch = !aarch64 > > > > [event:base-record] > > sample_type=295 > > diff --git a/tools/perf/tests/attr/test-record-graph-fp-aarch64 b/tools/perf/tests/attr/test-record-graph-fp-aarch64 > > new file mode 100644 > > index 000000000000..cbeea9971285 > > --- /dev/null > > +++ b/tools/perf/tests/attr/test-record-graph-fp-aarch64 > > @@ -0,0 +1,9 @@ > > +[config] > > +command = record > > +args = --no-bpf-event --call-graph fp kill >/dev/null 2>&1 > > +ret = 1 > > +arch = aarch64 > > + > > +[event:base-record] > > +sample_type=4391 > > +sample_regs_user=1073741824 -- - Arnaldo