Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4261882pxb; Tue, 25 Jan 2022 06:56:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPJ3Z3pA6R5t25QBsj/s4YWFgexq5u9DoCx/fXE7ghtitviHm72vRBWBc0POtwu8RzUlTD X-Received: by 2002:a05:6402:168b:: with SMTP id a11mr20467071edv.18.1643122591827; Tue, 25 Jan 2022 06:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643122591; cv=none; d=google.com; s=arc-20160816; b=Wji03IqBdhCVdxSTHd7aP4kTn7oIhBv2hi3bYqRHxZD+5XI5LTtO6LqTXEjtxIm+pm rWjhsKAkjv4AWVM2Hs2FOydLQ7StNxzKCdFgBU/O3rpT8BPFtgM3chpxtSGojW62GgxM uh+8SQoVYd7OsY7BvjFGdFRPiZ/C4GSS23LRB9jGJN3fPhv3DGFk0pJcgvF6JdDSsjRO zG9/i6G6jwgydZU75GmbHR7p81xGDQtzoE6WrwEMbZ8P4CpYL32/T4Sd3SM7vjkJguTw 4kcJ0qRKfN8i/0s+5TdvLlDIU+U6yJYAVJaXSd3/ABmgS7XBRtMIdMd+lkrODAQ+5Wjo DUHw== 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 :message-id:date:subject:cc:to:from; bh=dWRMP7gr2l4S5hDyOOPDeFFFt6hicbrbVI43p+cHXTY=; b=yiK0tyBiwHmvv87U/pfie+7ZMmdPVxltDAEto3ugLcZCreF0yZzVwcCQAH0n8qP5YE Zw/YO6PQHuRv/Ms7nA/7kgYVnHpw6dF7Ilrq73y3HuWFk+XG/yDGai1nubPABr2FbLmO ugp/o7HuTo9uIlrYHEBB5AYWwGCMmJ/y3Wqd2+iZ8GSChTXHlDdvhd6FZT6w+Zn3yDMI XEHqd1tCf8TmBP+Zehi3R9nSjVThLyWJEuCxyMsClyqcJn2TK70vmWYEs+4WRi6bdqPB h7FU66sypxRWzV1UcPUDy7IbaPEKVG/Hb7WkDZ1PHXppuaaz/OYQAKc3I3WNOvKOWHTe xsnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 26si4640020ejr.11.2022.01.25.06.56.06; Tue, 25 Jan 2022 06:56:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1376705AbiAYKrf (ORCPT + 99 others); Tue, 25 Jan 2022 05:47:35 -0500 Received: from foss.arm.com ([217.140.110.172]:34102 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355114AbiAYKou (ORCPT ); Tue, 25 Jan 2022 05:44:50 -0500 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 792DB1FB; Tue, 25 Jan 2022 02:44:44 -0800 (PST) Received: from ip-10-252-15-108.eu-west-1.compute.internal (unknown [10.252.15.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9E0813F7D8; Tue, 25 Jan 2022 02:44:41 -0800 (PST) From: German Gomez To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: irogers@google.com, German Gomez , 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 Subject: [PATCH] perf test: update arm64 perf_event_attr tests for --call-graph Date: Tue, 25 Jan 2022 10:44:34 +0000 Message-Id: <20220125104435.2737-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.25.1