From patchwork Tue Jan 25 19:20:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Saidi X-Patchwork-Id: 12724183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA8DFC433EF for ; Tue, 25 Jan 2022 19:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nJH4ZpIY+rttf1m1honlNxttCwyUiIJ/3fZt56uSP7M=; b=eCN18EneH3RFvu Qb3oqZPLQxpD4hLjrgudz9E+lUcnIutu8cKjRJsegfIc6Yw0fiVFpWK5NpG9bjReN20dPhsJgeiLk bcJa6Q6++qmH3jGtQ0BmhY0AdHtSB9ooVIduFMqcB2rIH0ruw6erIqbIzo/Nk2uZBrIindrUqYynm 68DAUvRxVBq67LlimxCqR9NjcgH9fCDPY+S5xvbwN84mo0mc/nePhnxuUp/UK6zQe2oGuVbZEkxvN +o4j8D1IgBgmbqTi92D9a2Ip49vWQtHagGhFSnWg1yYWK1xyoPb1GA2hUUkDY5NGkqjW5vQ7PtvmH tJzSxD4WTXnQImDXN++g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCRaR-009LS3-1c; Tue, 25 Jan 2022 19:34:39 +0000 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCRaN-009LRC-Jt for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 19:34:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1643139276; x=1674675276; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lxztq/mtL0h23FYq/vaK8RPNJ15WKjUkIqfQpt8jYbs=; b=EfomV+e7V+oaTqAdPSeMpUnbpisXWaEw/IzJlhvUUMz8fxUP+w4hIfjU jjcaLZNPk2saZ0vc4M/KbrxmRaZmMjmymrHB6wklQWsS2ebHbKYjGqAR/ cy1syTYIrG8g0hOTAtSEaxC2ksgXCoJ26IEavmkX7zpNmWFsi9s/g9Ivx s=; X-IronPort-AV: E=Sophos;i="5.88,315,1635206400"; d="scan'208";a="173065575" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 25 Jan 2022 19:34:33 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com (Postfix) with ESMTPS id E215C41A77; Tue, 25 Jan 2022 19:34:27 +0000 (UTC) Received: from EX13D02UWB001.ant.amazon.com (10.43.161.240) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Tue, 25 Jan 2022 19:34:24 +0000 Received: from EX13MTAUEA002.ant.amazon.com (10.43.61.77) by EX13D02UWB001.ant.amazon.com (10.43.161.240) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Tue, 25 Jan 2022 19:34:24 +0000 Received: from dev-dsk-alisaidi-i31e-9f3421fe.us-east-1.amazon.com (10.200.138.153) by mail-relay.amazon.com (10.43.61.169) with Microsoft SMTP Server id 15.0.1497.28 via Frontend Transport; Tue, 25 Jan 2022 19:34:23 +0000 Received: by dev-dsk-alisaidi-i31e-9f3421fe.us-east-1.amazon.com (Postfix, from userid 5131138) id 93D8D21E70; Tue, 25 Jan 2022 19:34:23 +0000 (UTC) From: Ali Saidi To: , , CC: , , Peter Zijlstra , Ingo Molnar , "Arnaldo Carvalho de Melo" , Mark Rutland , "Alexander Shishkin" , Jiri Olsa , Namhyung Kim , John Garry , "Will Deacon" , Mathieu Poirier , "Leo Yan" , James Clark , German Gomez , Andrew Kilroy Subject: [PATCH 1/2] perf arm-spe: Add arm_spe_record to synthesized sample Date: Tue, 25 Jan 2022 19:20:09 +0000 Message-ID: <20220125192016.20538-2-alisaidi@amazon.com> X-Mailer: git-send-email 2.24.4.AMZN In-Reply-To: <20220125192016.20538-1-alisaidi@amazon.com> References: <20220125192016.20538-1-alisaidi@amazon.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_113435_820158_6F7B0085 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Providing the arm_spe_record as raw data to the synthesized SPE samples allows perf scripts to read and separately process the data in ways existing perf tools don't support and mirrors functionality available for PEBS. Signed-off-by: Ali Saidi --- tools/perf/util/arm-spe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index d2b64e3f588b..a7499cde6fc0 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -336,6 +336,8 @@ static int arm_spe__synth_mem_sample(struct arm_spe_queue *speq, sample.phys_addr = record->phys_addr; sample.data_src = data_src; sample.weight = record->latency; + sample.raw_size = sizeof(*record); + sample.raw_data = record; return arm_spe_deliver_synth_event(spe, speq, event, &sample); } @@ -354,6 +356,8 @@ static int arm_spe__synth_branch_sample(struct arm_spe_queue *speq, sample.stream_id = spe_events_id; sample.addr = record->to_ip; sample.weight = record->latency; + sample.raw_size = sizeof(*record); + sample.raw_data = record; return arm_spe_deliver_synth_event(spe, speq, event, &sample); } @@ -383,6 +387,8 @@ static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq, sample.data_src = data_src; sample.period = spe->instructions_sample_period; sample.weight = record->latency; + sample.raw_size = sizeof(*record); + sample.raw_data = record; return arm_spe_deliver_synth_event(spe, speq, event, &sample); }