From: Yicong Yang <yangyicong@huawei.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <yangyicong@hisilicon.com>, <acme@kernel.org>,
<peterz@infradead.org>, <alexander.shishkin@linux.intel.com>,
<leo.yan@linaro.org>, <james.clark@arm.com>, <will@kernel.org>,
<mathieu.poirier@linaro.org>, <mark.rutland@arm.com>,
<suzuki.poulose@arm.com>, <jonathan.cameron@huawei.com>,
<john.garry@huawei.com>, <mike.leach@linaro.org>,
<gregkh@linuxfoundation.org>, <lorenzo.pieralisi@arm.com>,
<shameerali.kolothum.thodi@huawei.com>, <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>,
<prime.zeng@huawei.com>, <zhangshaokun@hisilicon.com>,
<linuxarm@huawei.com>, <liuqi6124@gmail.com>
Subject: Re: [PATCH v13 3/3] perf tool: Add support for parsing HiSilicon PCIe Trace packet
Date: Tue, 20 Sep 2022 11:04:17 +0800 [thread overview]
Message-ID: <da9e41a5-5e0b-adda-5648-f779e8e71fc7@huawei.com> (raw)
In-Reply-To: <20220919173238.GA1014074@bhelgaas>
On 2022/9/20 1:32, Bjorn Helgaas wrote:
> On Mon, Sep 19, 2022 at 05:00:45PM +0800, Yicong Yang wrote:
>> From: Qi Liu <liuqi115@huawei.com>
>>
>> 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
>
> This is great! Is there a way to actually decode the TLP headers?
> E.g., something along the lines of what this does?
> https://github.com/NetTLP/wireshark-nettlp/blob/master/plugins/nettlp.lua
Thanks for the link, we'd like to implement something similar. This patch brings
fundamental support for the decoding in perf, which means decoding according to
the hardware packets format definition of each fields. 8DW will like above and
4DW will look like (more detailed):
. ... HISI PTT data: size 4194304 bytes
. 00000000: ff 0f 20 40 Format 3 Type 1f T9 1 T8 1 TH 1 SO 1 Length 1 Time 201
. 00000004: 0f 10 80 00 Header DW1
. 00000008: 00 04 00 00 Header DW2
. 0000000c: 48 01 01 00 Header DW3
In the next step we intend to do further decoding in the perf report, with granule
to each fields defined in the PCIe spec according to the different TLP's format
and type.
> If there is, it might be nice if the commit log included a hint about
> how to do more decoding.
>
Since the definition of each Header DWx is exactly the same with the PCIe spec,
so I think user can certainly get the raw data and use the tools like nettlp.lua
to further decode for now.
Thanks,
Yicong
prev parent reply other threads:[~2022-09-20 3:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 9:00 [PATCH v13 0/3] Add perf support for HiSilicon PCIe Tune and Trace device Yicong Yang
2022-09-19 9:00 ` [PATCH v13 1/3] perf tool: arm: Refactor event list iteration in auxtrace_record__init() Yicong Yang
2022-09-26 11:33 ` John Garry
2022-09-19 9:00 ` [PATCH v13 2/3] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver Yicong Yang
2022-09-23 10:49 ` John Garry
2022-09-26 6:53 ` Yicong Yang
2022-10-14 20:42 ` Arnaldo Carvalho de Melo
2022-09-19 9:00 ` [PATCH v13 3/3] perf tool: Add support for parsing HiSilicon PCIe Trace packet Yicong Yang
2022-09-19 17:32 ` Bjorn Helgaas
2022-09-20 3:04 ` Yicong Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da9e41a5-5e0b-adda-5648-f779e8e71fc7@huawei.com \
--to=yangyicong@huawei.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=james.clark@arm.com \
--cc=john.garry@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liuqi6124@gmail.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=prime.zeng@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=yangyicong@hisilicon.com \
--cc=zhangshaokun@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®