Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp864889pxb; Wed, 16 Feb 2022 06:09:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzg4cudXtzixfyItdZVtAe52vXroPxCEp+8aj1I6Dr/+q6jC1KL75lcdMdYNH83N6+HAL7t X-Received: by 2002:a63:6cc2:0:b0:373:6dfb:297 with SMTP id h185-20020a636cc2000000b003736dfb0297mr2299402pgc.1.1645020550661; Wed, 16 Feb 2022 06:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645020550; cv=none; d=google.com; s=arc-20160816; b=jv+7MNrAzioFuEGo2L/Ftf+p1inNknb2CUeCyakaL4TS8lAW5296xznF00RD6Ke8ds naudu+eEaCkeJusii1zK7vWtvSpdI+oJqLEl7iNH+CsCsg0ajP3gNvzI9CX7t4HUF1fX 4QQ0pNBWL9lxzpQUIbtJSEReR2rcztavHbymfh6dzj3Y83/itvUMnHGX+Ao3mVbcEOEQ 7OcMGG0jziOKkEoZ0qVBcL2lEORXLqURhXX9ZnUGnXAxJlfjB+7oQl2ZD05dBVISjM0z 6Ia2EPtsiyKUFIs5TLXAj4nSo83qgEdc+C/nZa7kW0WeUVLLky6s3/r7wmly9NMYk7oB UV/A== 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:from:references :cc:to:subject; bh=BlLQDk+roRO4DzCZW2i8rtOQap52pJyXwKFi61N0tQ8=; b=0IKyzPBrnG3bWGRUZHlauUG9LzuuJtImgWD7F4UelZ3WgqdfdLMpUXbJhJ+m1xP3UX IuefcfkUO9vAo3Kfxccj19YxFtb8Sp4HLOpuc4nYX4pPN7sri9tBIEFQ1fH+rsnK2w3v 8snJmjdzjGGSfvWMM7EoYW78VzDcJFtJASJeN33uhRZfO+EBAYs9dRzR9Fy62Aqo+zsb PtUYP42uLbL6Y32KY33DlXTkdVNfvv6m72oyBJIFKRb4vfC39WA0vpFmmFsN0m5cRkS2 EN5tj7dEvtd24jWm/WKiYVcqnVT20t27K7AmiEal330ZjlUqf3V1Nzf+x6GOJrieNsp0 jmlQ== 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 d9si7968409pfl.73.2022.02.16.06.08.49; Wed, 16 Feb 2022 06:09:10 -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 S233696AbiBPNVR (ORCPT + 99 others); Wed, 16 Feb 2022 08:21:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbiBPNTc (ORCPT ); Wed, 16 Feb 2022 08:19:32 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2BD5C29B9C2; Wed, 16 Feb 2022 05:18:45 -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 87532106F; Wed, 16 Feb 2022 05:18:45 -0800 (PST) Received: from [10.1.31.148] (e127744.cambridge.arm.com [10.1.31.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 017123F66F; Wed, 16 Feb 2022 05:18:41 -0800 (PST) Subject: Re: [PATCH] perf test: update arm64 perf_event_attr tests for --call-graph To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: 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 References: <20220125104435.2737-1-german.gomez@arm.com> From: German Gomez Message-ID: <622a42bd-69da-0df4-bbf3-7d21de77c73b@arm.com> Date: Wed, 16 Feb 2022 13:17:56 +0000 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: <20220125104435.2737-1-german.gomez@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-6.9 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 Hi, Friendly ping on this perf-test fix for arm64 I will include some quick test notes: 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