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 06810C433F5 for ; Mon, 16 May 2022 14:24:47 +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: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=7qmLwZ4vIJcE9mHq7Ghcp8/LNpuCnkqy+G+wo0s9G6Y=; b=tWDZ/CC6fzg6Oy WAJtIUC3fWK7xhKUihFgannSHm74/IiqB5hrkKad48r+UrjSidf3JVrbpSQIV/ART4VfsOkyxNvU/ gHh/JYGbc+gAQK8Ho4tnPB0Xz2iX09jEV7p/Y3dbTZNuxKrqZ9sXT0MGjk7kms2YEd7OEk5BvHukG T46HbILOsQ94hrUO6sHf2Ob/oXDVkmSTmXYbeR/9xXJVZP6gj+oC2lzY2rOEdbY/Pc/ofgzLyZ+/d om3n1tJhkw5ycJRmgt3UtzjRpIlrDj2MS5RTz4bR5pNIFZ4SVnvVe0g7zH2z/yvdBXFy6a6Y+aCgk cKlzrEQVTDXcG7CsjcXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqbdP-008KJf-2U; Mon, 16 May 2022 14:23:43 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqbd4-008K6A-Lr for linux-arm-kernel@lists.infradead.org; Mon, 16 May 2022 14:23:24 +0000 Received: from fraeml710-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4L21cN4Q2Zz67NY6; Mon, 16 May 2022 22:20:20 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml710-chm.china.huawei.com (10.206.15.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 16 May 2022 16:23:20 +0200 Received: from localhost (10.202.226.42) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 16 May 2022 15:23:18 +0100 Date: Mon, 16 May 2022 15:23:17 +0100 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v8 6/8] perf tool: Add support for parsing HiSilicon PCIe Trace packet Message-ID: <20220516152317.000029d8@Huawei.com> In-Reply-To: <20220516125223.32012-7-yangyicong@hisilicon.com> References: <20220516125223.32012-1-yangyicong@hisilicon.com> <20220516125223.32012-7-yangyicong@hisilicon.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhreml736-chm.china.huawei.com (10.201.108.87) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220516_072323_077795_FF6A2990 X-CRM114-Status: GOOD ( 10.85 ) 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, 16 May 2022 20:52:21 +0800 Yicong Yang wrote: > From: Qi Liu > > Add support for using 'perf report --dump-raw-trace' to parse PTT packet. > > Example usage: > > Output will contain raw PTT data and its textual representation, such > as: > > 0 0 0x5810 [0x30]: PERF_RECORD_AUXTRACE size: 0x400000 offset: 0 > ref: 0xa5d50c725 idx: 0 tid: -1 cpu: 0 > . > . ... HISI PTT data: size 4194304 bytes > . 00000000: 00 00 00 00 Prefix > . 00000004: 08 20 00 60 Header DW0 > . 00000008: ff 02 00 01 Header DW1 > . 0000000c: 20 08 00 00 Header DW2 > . 00000010: 10 e7 44 ab Header DW3 > . 00000014: 2a a8 1e 01 Time > . 00000020: 00 00 00 00 Prefix > . 00000024: 01 00 00 60 Header DW0 > . 00000028: 0f 1e 00 01 Header DW1 > . 0000002c: 04 00 00 00 Header DW2 > . 00000030: 40 00 81 02 Header DW3 > . 00000034: ee 02 00 00 Time > .... > > Signed-off-by: Qi Liu > Signed-off-by: Yicong Yang >From point of view of a reviewer who doesn't know this code well, this all looks sensible. One trivial comment inline. Thanks, Jonathan > diff --git a/tools/perf/util/hisi-ptt.c b/tools/perf/util/hisi-ptt.c > new file mode 100644 > index 000000000000..2afc1a663c2a > --- /dev/null > + > +static void hisi_ptt_free(struct perf_session *session) > +{ > + struct hisi_ptt *ptt = container_of(session->auxtrace, struct hisi_ptt, > + auxtrace); > + > + session->auxtrace = NULL; > + free(ptt); > +} > + > +static bool hisi_ptt_evsel_is_auxtrace(struct perf_session *session, > + struct evsel *evsel) > +{ > + struct hisi_ptt *ptt = container_of(session->auxtrace, struct hisi_ptt, auxtrace); Check for consistent wrapping of lines like this. This doesn't match the one just above. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel