Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3647693rwb; Tue, 16 Aug 2022 06:43:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR43l2dT7rR7UTKzIVvcjxWKjy1XPGJ58LGwDpAqzmbBWDveKQAKkihyL4IdurYfcx5RMbDX X-Received: by 2002:a05:6a00:8cf:b0:522:93a6:46e9 with SMTP id s15-20020a056a0008cf00b0052293a646e9mr21844800pfu.62.1660657398372; Tue, 16 Aug 2022 06:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660657398; cv=none; d=google.com; s=arc-20160816; b=IDY5NrDk/7Lp2QLemIIDo/f8EEUEyH+CUV9G2S1yueXrpJNR6g9vH7kKo7KP32UvgN bjvnzFHcyqA3RooflUDF7Znl+0pxThXFu7+QkD5y2CONCUO7LOIg1KkinNZxbGjDNDHR QJ44u35ZfGf2tr/sqryIeYzZV6i2fch7xgUoxe9jDWRTr+zacn33V2ypTnzt9j8jzW+M guN/SpCXAkSb8uRxDYzxcIru47v7v1WnGhFIw20zCFXFZ8L64Ymoe7utkRnsYJwwfmjW GRgY+bG69zzevpHa5Z01fw2saOU4hUbkTF2zyX5YbQk244IOXbdpBi4YnySgrVXOL0It O+kA== 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=x3aETONtJRBOiQbi3e4UPEagzlCKdiekMcEjYXgYRWE=; b=btRFvvQNXuJcPSlV5fOyEh+SHbKzzERaBrqbQu/bx6x7JGG/myjULV8bCU+u6gqRFK WOuAkOfH8tjNz+9O+Hc42qGHsa4s1PaaiMlRlctCw/jTvBIQs9Ogh/sgwakqMeHQ3CfL Qi3+hU0l8CJXO131MN1QBMkajY+EYwuLpJ3tEpoDdkm2A04xdMtYGuwrt2wJYtA66RKl 33m092tpyRvZSJo1agy8Xzu5G1m3YZZIaDraRP5x0t/yQYvruaPH9Gd22t3u41mMlEkx x2DsNbtgOkZ5FyGKrQ4+AwuaKSGB3Mw3JXFqf77zz2jvHRRhQQ+PSYI9oQr3H4VyUp5x BMIA== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a170903228900b0016f035dcd85si15537011plh.517.2022.08.16.06.43.07; Tue, 16 Aug 2022 06:43:18 -0700 (PDT) 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234690AbiHPNBZ (ORCPT + 99 others); Tue, 16 Aug 2022 09:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234305AbiHPNAS (ORCPT ); Tue, 16 Aug 2022 09:00:18 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 630D6B2DB0; Tue, 16 Aug 2022 05:59:57 -0700 (PDT) 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 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 -- 2.24.0