From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 029F3C43334 for ; Mon, 27 Jun 2022 02:03:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230174AbiF0CDI (ORCPT ); Sun, 26 Jun 2022 22:03:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiF0CDG (ORCPT ); Sun, 26 Jun 2022 22:03:06 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53619F4C for ; Sun, 26 Jun 2022 19:03:05 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso8039471pjk.0 for ; Sun, 26 Jun 2022 19:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cFzsYDSniCnlBZ03HwKNu3S5QmFfxy2xvMgtRDJMZis=; b=W9NMxYS6VjeyTC2cMMP/U2hMAgucbyOeYIMRtdhZhBzWM9I5CHJvC78CT5KjWoRSaI YMzEn64lLecRyWTMhmh0DrHudZ2V8CW8H/fh2J5A0kUiPIXFaaiKzPzEaOeWTlieEib0 RzNwvSJPuZS6TGyznaBwVLM9izVf6IwyagW8sNL0vyHz9rXDH9/INPnaOfE4mNWGB6+j EHtJnShucEnJpz2SjeJ3B06AvpibDKU7g8RGBvsSTA6UqjenJhNn4rlQ3c05GJmR4qcl Lk+TrcPs0cWqt6+Kmek4rYYmJccguriPiiBOQudPQNC9JtmDL6HWcSgH0IN2z+JLduXZ gFmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cFzsYDSniCnlBZ03HwKNu3S5QmFfxy2xvMgtRDJMZis=; b=M9b67GF0e1ynvj8wT4T1IbhxIitXEKQ9b/gGiDyPdzSx32q1zI97gsqjiCmOtLuGfQ 7l7HJmat5pFYwc/15nLDjbheJQEi6m/n1l/gkB02FfczQbTF4cUomVrayE5zCpZvi5jS +OVbP/NNhMMGWuFfZoYqVBOxu9lNcEPtqcNxlNX7rwPFeKWazEZQb3C5NLkTVPKCBilH p2+ptkKbNCkN5Nb0WH6zRF6FTExrBwGAc64sGPWSjYTGuhdr7l/Ah+wftWqLGqgxS20u j/lbY6Sow1REI/Z16+ys7bioTsusMp+oK12tF8AyAzwwg/2mea3q92V9jYmiPwLpHNLy BXaA== X-Gm-Message-State: AJIora+5d8ISPAtnreGdombAPF8+05Mk64Kr3hwcq55PNkN4GtQnBeAo FljPX1EQ/ECO2S0lzeM3Xzil/A== X-Google-Smtp-Source: AGRyM1sMApCNujHeAcMS6o2le4b1Rwn51Wk9w2AAmuhkBTXz7YYbL0AMbuIim8kFUBy3QBW5KtcrJg== X-Received: by 2002:a17:90b:4c86:b0:1ec:cc0f:32da with SMTP id my6-20020a17090b4c8600b001eccc0f32damr18286077pjb.66.1656295384629; Sun, 26 Jun 2022 19:03:04 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.135.249.206]) by smtp.gmail.com with ESMTPSA id g8-20020a056a00078800b0050e006279bfsm5834982pfu.137.2022.06.26.19.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jun 2022 19:03:04 -0700 (PDT) Date: Mon, 27 Jun 2022 10:02:56 +0800 From: Leo Yan To: Yicong Yang Cc: gregkh@linuxfoundation.org, alexander.shishkin@linux.intel.com, james.clark@arm.com, will@kernel.org, robin.murphy@arm.com, acme@kernel.org, jonathan.cameron@huawei.com, john.garry@huawei.com, helgaas@kernel.org, lorenzo.pieralisi@arm.com, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mark.rutland@arm.com, joro@8bytes.org, shameerali.kolothum.thodi@huawei.com, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-perf-users@vger.kernel.org, iommu@lists.linux-foundation.org, prime.zeng@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com, linuxarm@huawei.com Subject: Re: [PATCH v9 5/8] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver Message-ID: <20220627020256.GB143063@leoy-ThinkPad-X240s> References: <20220606115555.41103-1-yangyicong@hisilicon.com> <20220606115555.41103-6-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220606115555.41103-6-yangyicong@hisilicon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. With this fixing, this patch looks good to me: Reviewed-by: Leo Yan > + > +#endif > -- > 2.24.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 18E21CCA47C for ; Mon, 27 Jun 2022 02:03:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 986B282E4C; Mon, 27 Jun 2022 02:03:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 986B282E4C Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=W9NMxYS6 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n7NjdzD8RLic; Mon, 27 Jun 2022 02:03:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3CD1482D2F; Mon, 27 Jun 2022 02:03:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3CD1482D2F Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F17E9C0032; Mon, 27 Jun 2022 02:03:07 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9E428C002D for ; Mon, 27 Jun 2022 02:03:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5276E60E74 for ; Mon, 27 Jun 2022 02:03:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5276E60E74 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=W9NMxYS6 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QUqbZOpJFCKF for ; Mon, 27 Jun 2022 02:03:05 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5CCB760E30 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5CCB760E30 for ; Mon, 27 Jun 2022 02:03:05 +0000 (UTC) Received: by mail-pj1-x1034.google.com with SMTP id n16-20020a17090ade9000b001ed15b37424so7982021pjv.3 for ; Sun, 26 Jun 2022 19:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cFzsYDSniCnlBZ03HwKNu3S5QmFfxy2xvMgtRDJMZis=; b=W9NMxYS6VjeyTC2cMMP/U2hMAgucbyOeYIMRtdhZhBzWM9I5CHJvC78CT5KjWoRSaI YMzEn64lLecRyWTMhmh0DrHudZ2V8CW8H/fh2J5A0kUiPIXFaaiKzPzEaOeWTlieEib0 RzNwvSJPuZS6TGyznaBwVLM9izVf6IwyagW8sNL0vyHz9rXDH9/INPnaOfE4mNWGB6+j EHtJnShucEnJpz2SjeJ3B06AvpibDKU7g8RGBvsSTA6UqjenJhNn4rlQ3c05GJmR4qcl Lk+TrcPs0cWqt6+Kmek4rYYmJccguriPiiBOQudPQNC9JtmDL6HWcSgH0IN2z+JLduXZ gFmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cFzsYDSniCnlBZ03HwKNu3S5QmFfxy2xvMgtRDJMZis=; b=p5M4L64N3JGTy2RVpXNpcjGXAZfyb9dLTOlXUteGx+sBW3lLIP6OKPIu1IPde9yr0a h7hg4TOSfXSZks9MKqJR/s04pFYUk39wW7CzZFGnZgGS5+A1ZNLF8uguzF1+HYDbPFrf ckqU0ourFu994ZkylnB9t3xDbg2kn6JjU+N6QMEBtLKYnswx6JrL2hd38EW3MyhAK6RM 1OIZ26pZJyge8kLXB4adSInzcN1NKV6maxIp/+320EdAxOjCrW6kdeUzmo76G9SMFnc+ hb/YSh4+Br1TZOjnQsB8V5OGWVl28WEYkrHOKo23Wjt0cNcbmlq8zFYmOH/8szvo0X8P mNuA== X-Gm-Message-State: AJIora+qzJPxD58unpDhNtRiqabVGflLKNmrmVsouC/W0EDIYFoljQfg uFu1SaE080UV6WAoPBbtaLznuA== X-Google-Smtp-Source: AGRyM1sMApCNujHeAcMS6o2le4b1Rwn51Wk9w2AAmuhkBTXz7YYbL0AMbuIim8kFUBy3QBW5KtcrJg== X-Received: by 2002:a17:90b:4c86:b0:1ec:cc0f:32da with SMTP id my6-20020a17090b4c8600b001eccc0f32damr18286077pjb.66.1656295384629; Sun, 26 Jun 2022 19:03:04 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.135.249.206]) by smtp.gmail.com with ESMTPSA id g8-20020a056a00078800b0050e006279bfsm5834982pfu.137.2022.06.26.19.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jun 2022 19:03:04 -0700 (PDT) Date: Mon, 27 Jun 2022 10:02:56 +0800 From: Leo Yan To: Yicong Yang Subject: Re: [PATCH v9 5/8] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver Message-ID: <20220627020256.GB143063@leoy-ThinkPad-X240s> References: <20220606115555.41103-1-yangyicong@hisilicon.com> <20220606115555.41103-6-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220606115555.41103-6-yangyicong@hisilicon.com> Cc: mark.rutland@arm.com, prime.zeng@huawei.com, alexander.shishkin@linux.intel.com, linux-pci@vger.kernel.org, linuxarm@huawei.com, james.clark@arm.com, will@kernel.org, peterz@infradead.org, mingo@redhat.com, helgaas@kernel.org, liuqi115@huawei.com, suzuki.poulose@arm.com, acme@kernel.org, zhangshaokun@hisilicon.com, linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, iommu@lists.linux-foundation.org, robin.murphy@arm.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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. With this fixing, this patch looks good to me: Reviewed-by: Leo Yan > + > +#endif > -- > 2.24.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 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 E73B1C433EF for ; Mon, 27 Jun 2022 02:04:52 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4HOEQjXa+yDWwmF3wirPc8Rjcbau0Wb6tuFqa8sDpQU=; b=SAeww7UzJzLRtt XsIj993Fb+i2jxB8OnDXl0aW3PzcXEB4CB8bdfLVFgXQLtNk5aSFglmci5TpqPr0hWi4OzTIz058Q 7VMQF6vehXwtTYslw/iiWipFw+m0a38Q4O4LMuWSqikHNH0/pn434r5f9EdKjlYOtSqV0TqolAj3r 9LdG/Ra7e78DLE/E80bti5d+GjWOCmlInmvMxQvkWNPVbR+Dr8D1w0y68nm0n1ulAL8X5BQDzj/ne 9ItLWbTvOWyGDeyp8nb5QhkK3clD9EZThKHI7jmfPDV8ihZUgMXGvwHpHXm1DiB1BGQjDfKfTDhPC /EAamw04IjIdNLPWwDsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5e5m-00EahR-0p; Mon, 27 Jun 2022 02:03:10 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5e5i-00EafI-EC for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2022 02:03:07 +0000 Received: by mail-pl1-x62e.google.com with SMTP id r1so6869012plo.10 for ; Sun, 26 Jun 2022 19:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cFzsYDSniCnlBZ03HwKNu3S5QmFfxy2xvMgtRDJMZis=; b=W9NMxYS6VjeyTC2cMMP/U2hMAgucbyOeYIMRtdhZhBzWM9I5CHJvC78CT5KjWoRSaI YMzEn64lLecRyWTMhmh0DrHudZ2V8CW8H/fh2J5A0kUiPIXFaaiKzPzEaOeWTlieEib0 RzNwvSJPuZS6TGyznaBwVLM9izVf6IwyagW8sNL0vyHz9rXDH9/INPnaOfE4mNWGB6+j EHtJnShucEnJpz2SjeJ3B06AvpibDKU7g8RGBvsSTA6UqjenJhNn4rlQ3c05GJmR4qcl Lk+TrcPs0cWqt6+Kmek4rYYmJccguriPiiBOQudPQNC9JtmDL6HWcSgH0IN2z+JLduXZ gFmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cFzsYDSniCnlBZ03HwKNu3S5QmFfxy2xvMgtRDJMZis=; b=OD+9r3U40f3QvJh1P4WtOBZARz5pcSEFRetboLtZkTi3dMrQZ9APJ9ogMdAwuY5kMK Nehww4ZVM/zsLc/HPi1srrMJTa7gAiERZ734aut+ZNjR7Mve4NzNgvlmNhxerEmLe1I+ 2hYY1IJJQ5rZFSTi2nWfGaLSp0VRvEjNyogUkbmAp0ghaShMs8OLbOH/GwwxPFZt6fwL eiHI+lG9NDxrekHrbHjq05iPWIsuqieRa9cSAbBEp9OuyHMm7NpxzXQRl8//9ont8VhQ hvKqFtrJR5OLLbeuwSrst0gu3J4Iw7lCvKbho9ezJUpb9JNHOAh04VKuLT5nJF+n0h3r +fXg== X-Gm-Message-State: AJIora+JXeNzA+nLalk8gaoMvTRFLTJgEUoYWMpgBYWTGNvp5hvc6yCd JSVuD7PU6KAUKrs+qc4hOX7oUA== X-Google-Smtp-Source: AGRyM1sMApCNujHeAcMS6o2le4b1Rwn51Wk9w2AAmuhkBTXz7YYbL0AMbuIim8kFUBy3QBW5KtcrJg== X-Received: by 2002:a17:90b:4c86:b0:1ec:cc0f:32da with SMTP id my6-20020a17090b4c8600b001eccc0f32damr18286077pjb.66.1656295384629; Sun, 26 Jun 2022 19:03:04 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.135.249.206]) by smtp.gmail.com with ESMTPSA id g8-20020a056a00078800b0050e006279bfsm5834982pfu.137.2022.06.26.19.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jun 2022 19:03:04 -0700 (PDT) Date: Mon, 27 Jun 2022 10:02:56 +0800 From: Leo Yan To: Yicong Yang Cc: gregkh@linuxfoundation.org, alexander.shishkin@linux.intel.com, james.clark@arm.com, will@kernel.org, robin.murphy@arm.com, acme@kernel.org, jonathan.cameron@huawei.com, john.garry@huawei.com, helgaas@kernel.org, lorenzo.pieralisi@arm.com, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mark.rutland@arm.com, joro@8bytes.org, shameerali.kolothum.thodi@huawei.com, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-perf-users@vger.kernel.org, iommu@lists.linux-foundation.org, prime.zeng@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com, linuxarm@huawei.com Subject: Re: [PATCH v9 5/8] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver Message-ID: <20220627020256.GB143063@leoy-ThinkPad-X240s> References: <20220606115555.41103-1-yangyicong@hisilicon.com> <20220606115555.41103-6-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220606115555.41103-6-yangyicong@hisilicon.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220626_190306_506920_4F0A37D6 X-CRM114-Status: GOOD ( 17.76 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. With this fixing, this patch looks good to me: Reviewed-by: Leo Yan > + > +#endif > -- > 2.24.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel