Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2737225iog; Mon, 27 Jun 2022 01:39:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXAHOjyYZ7Nx+wuSVEcu2gQXKlcAZohm7lZrVMIQWebrAZfqytaXU7NJMcVnaWF/edFsz5 X-Received: by 2002:a63:3c14:0:b0:40c:a165:b85 with SMTP id j20-20020a633c14000000b0040ca1650b85mr11391801pga.504.1656319180966; Mon, 27 Jun 2022 01:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656319180; cv=none; d=google.com; s=arc-20160816; b=cp54xX4tzRmR92ngQQacGV0a0BD5Cok92AIvn2c5XnxAw45F+gtC4oQkQUW3aqNici QGucVKidgZYrw5/9dv+NoSJI7yn1aaxlw/UfGVgXX/QBwK6eFv81hxiLYuyeSblf9XdW YjXu07mlSf2gLCZUdOPgMkPuIHeSw5jraGK6XOIEW+HsdpYDXhIuiRnB3hWgO10iiOoC jglfcLDGmwnfpBoEg3qMP9nVGsOJTQbDdGQ+PCbc7xTqCuMFeQzOFd8w9gJPxEP4DV+W MUZqavBG/VehCVGL9aFrtsFVculNRNu58isaDfXHDnRPFKnGpXK5i2qjrhpxnxH7Gpem FBEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :cc; bh=BV4uzdtzwB/SmDfpn5TZvZMJQDZ3triCqWvSHq+DdG0=; b=TBOBhDhMHPi3DqGZVu7zYw5aavikbECcb7T6zqP5cJ/YRlObhQ7js80Bcdt7FZ1ybP 6Ak9XVB3dy3KzIXrjy8tLgrcHGEVcz21krWjJaTabXCHfsE+CdEBEPHNdo5P3Uh1sKkN reF2cU0YQLiHURJvYb6r5PXZHq+Sox+rZZgby55r3wNCB79dF8RwjqUlXsWQbqmjCDAM x/Hv5ZQT7iJG9b3mbvKjol/U9RdvUET3EJJsr6UIU3ULf781DAZjbyRu87uzXIN0+uLQ PHE80xxxIALVVYbQFOBm5BrMR8+7J7VErbj0/t2KdT7djduI/3dwyYS2ovQFJoknpsMu zQBA== 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 b14-20020a056a000a8e00b0051c147c59absi13434888pfl.353.2022.06.27.01.39.28; Mon, 27 Jun 2022 01:39:40 -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 S232787AbiF0ISm (ORCPT + 99 others); Mon, 27 Jun 2022 04:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232452AbiF0ISl (ORCPT ); Mon, 27 Jun 2022 04:18:41 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE065C76; Mon, 27 Jun 2022 01:18:39 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LWgY31qVdzhYn4; Mon, 27 Jun 2022 16:16:23 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) 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; Mon, 27 Jun 2022 16:18:36 +0800 CC: , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v9 5/8] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver To: Leo Yan , Yicong Yang References: <20220606115555.41103-1-yangyicong@hisilicon.com> <20220606115555.41103-6-yangyicong@hisilicon.com> <20220627020256.GB143063@leoy-ThinkPad-X240s> From: Yicong Yang Message-ID: Date: Mon, 27 Jun 2022 16:18:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20220627020256.GB143063@leoy-ThinkPad-X240s> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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,NICE_REPLY_A, 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 On 2022/6/27 10:02, Leo Yan wrote: > On Mon, Jun 06, 2022 at 07:55:52PM +0800, Yicong Yang wrote: >> From: Qi Liu >> >> HiSilicon PCIe tune and trace device (PTT) could dynamically tune >> the PCIe link's events, and trace the TLP headers). >> >> This patch add support for PTT device in perf tool, so users could >> use 'perf record' to get TLP headers trace data. >> >> Signed-off-by: Qi Liu >> Signed-off-by: Yicong Yang > > Just one minor comment. > > [...] > >> diff --git a/tools/perf/util/hisi-ptt.h b/tools/perf/util/hisi-ptt.h >> new file mode 100644 >> index 000000000000..2db9b4056214 >> --- /dev/null >> +++ b/tools/perf/util/hisi-ptt.h >> @@ -0,0 +1,19 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +/* >> + * HiSilicon PCIe Trace and Tuning (PTT) support >> + * Copyright (c) 2022 HiSilicon Technologies Co., Ltd. >> + */ >> + >> +#ifndef INCLUDE__PERF_HISI_PTT_H__ >> +#define INCLUDE__PERF_HISI_PTT_H__ >> + >> +#define HISI_PTT_PMU_NAME "hisi_ptt" >> +#define HISI_PTT_AUXTRACE_PRIV_SIZE sizeof(u64) >> + >> +struct auxtrace_record *hisi_ptt_recording_init(int *err, >> + struct perf_pmu *hisi_ptt_pmu); >> + >> +int hisi_ptt_process_auxtrace_info(union perf_event *event, >> + struct perf_session *session); > > The function hisi_ptt_process_auxtrace_info() is introduced by next > patch for support PTT decoding, for good practice (e.g. keep > bisection), it's good to introduce function declaration and definition > in one patch. > Thanks for catching this. There's something wrong when doing the patch splitting. Will fix this! > With this fixing, this patch looks good to me: > > Reviewed-by: Leo Yan > Thanks.