From patchwork Tue Aug 16 12:57:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 12944888 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 2CFBDC25B0E for ; Tue, 16 Aug 2022 13:01:32 +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: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:In-Reply-To:References: List-Owner; bh=7vICMWQJFjruRIWhBdINY00GDnuD89Ar0WgLi59WH2k=; b=VQcuSqbgBc/R5R ppKZq0Gg3eppU3Nn9Dn4oPgp/7yjjM6jBvUcIKFvuGlPxvBIVCpTKPYPDkHDLx1iCux8XnDcDerpY P7pTGrsA3K7XOQ1lhEnaLP8zG2GcD9RYypFDFwcKBRtWt+aML4R3eUUtFscHoyrLFTJx19qQ9B4Ey thIaHMNmxTwGsb99hpVJ1yRJHWto8nv1Gaydy3QHicWbpYKv0OJTqS8vnLyeWQuozOjVF4QnkOT+P 8XSOODPxEDgJZWlAyhdA6IOktJ6MnAkx7vJ3zwNhn3gLbADhxYmGlbXvjCbLL1HZdm868/LrlFVc0 qbRWE8LEhuXD9qn4TFiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNwAz-002ZkD-8u; Tue, 16 Aug 2022 13:00:09 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNwAp-002Zbk-JP for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2022 13:00:02 +0000 Received: from canpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4M6WQb0xGbzmVm6; Tue, 16 Aug 2022 20:57:43 +0800 (CST) Received: from localhost.localdomain (10.67.164.66) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 16 Aug 2022 20:59:53 +0800 From: Yicong Yang To: , , , , , , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH v12 0/3] Add perf support for HiSilicon PCIe Tune and Trace device Date: Tue, 16 Aug 2022 20:57:54 +0800 Message-ID: <20220816125757.60302-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-Originating-IP: [10.67.164.66] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220816_055959_953650_7BD729E9 X-CRM114-Status: GOOD ( 11.00 ) 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 From: Yicong Yang This patchset adds the perf tool support for HiSilicon PCIe Tune and Trace device [1]. The device driver makes use of perf AUX trace for tracing TLP(Transaction Layer Packet) headers of PCIe. The trace can be used by `perf record` and the traced data can be decoded by `perf report` with this patchset. The detailed usage is documented in [1]. This is split from the v11 series as suggested to send driver part and perf tool part separately. The perf tool part has no change since v11. The whole changelog can be found at [2]. [1] https://lore.kernel.org/lkml/20220816114414.4092-5-yangyicong@huawei.com/ [2] https://lore.kernel.org/lkml/20220816114414.4092-1-yangyicong@huawei.com/ Qi Liu (3): perf tool: arm: Refactor event list iteration in auxtrace_record__init() perf tool: Add support for HiSilicon PCIe Tune and Trace device driver perf tool: Add support for parsing HiSilicon PCIe Trace packet tools/perf/arch/arm/util/auxtrace.c | 116 +++++++++-- tools/perf/arch/arm/util/pmu.c | 3 + tools/perf/arch/arm64/util/Build | 2 +- tools/perf/arch/arm64/util/hisi-ptt.c | 188 +++++++++++++++++ tools/perf/util/Build | 2 + tools/perf/util/auxtrace.c | 4 + tools/perf/util/auxtrace.h | 1 + tools/perf/util/hisi-ptt-decoder/Build | 1 + .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 164 +++++++++++++++ .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.h | 31 +++ tools/perf/util/hisi-ptt.c | 192 ++++++++++++++++++ tools/perf/util/hisi-ptt.h | 19 ++ 12 files changed, 703 insertions(+), 20 deletions(-) create mode 100644 tools/perf/arch/arm64/util/hisi-ptt.c create mode 100644 tools/perf/util/hisi-ptt-decoder/Build create mode 100644 tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c create mode 100644 tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h create mode 100644 tools/perf/util/hisi-ptt.c create mode 100644 tools/perf/util/hisi-ptt.h