Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sizhe Liu" <liusizhe5@huawei.com>
Cc: linux-pci@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v4 8/8] perf hisi-ptt: Pass pattern version to decoder for compatibility
Date: Tue, 08 Sep 2026 14:28:15 +0000	[thread overview]
Message-ID: <20260908142816.370DE1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908140509.2485649-9-liusizhe5@huawei.com>

> On the recording side, walk the evlist in hisi_ptt_info_fill() to find
> the hisi_ptt event, read out the pattern bits from its config, and
> forward the pattern version to the decoder through
> auxtrace_info->priv[1] as HISI_PTT_PATTERN_LEGACY or HISI_PTT_PATTERN_V1.
> 
> On the decoding side, store the pattern version in struct hisi_ptt and
> propagate it to struct hisi_ptt_pkt_buf. The printers of Header DW2
> and DW3 check the version: HISI_PTT_PATTERN_V1 keeps the field-level
> parsing introduced by the previous patches, while HISI_PTT_PATTERN_LEGACY
> falls back to printing only the raw "Header DW2/DW3" label so legacy
> traces remain decodable with the new tool.
> 
> The auxtrace priv size grows from one u64 to two. Use
> HISI_PTT_AUXTRACE_PRIV_SIZE_LEGACY for the minimum header size check
> and detect the actual priv_size at runtime to pick the pattern version.
> For trace data recorded by an older tracer that does not support the
> `pattern` parameter (no priv[1] in the header), the decoder defaults
> to legacy mode (HISI_PTT_PATTERN_LEGACY) so the new tool keeps parsing
> old traces correctly.
> 
> The hisi_ptt_pkt_size array is moved out of the shared header into
> static definitions in the two .c files that consume it to avoid
> multiple definitions.
> 
> Reviewed-by: Yushan Wang <wangyushan12@huawei.com>
> Signed-off-by: Sizhe Liu <liusizhe5@huawei.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908140509.2485649-1-liusizhe5@huawei.com?part=8


  reply	other threads:[~2026-09-08 14:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 14:05 [PATCH v4 0/8] Enhance TLP packet decoder with field-level parsing and versioning Sizhe Liu
2026-09-08 14:05 ` [PATCH v4 1/8] perf hisi-ptt: Abstract trace data buf and offset Sizhe Liu
2026-09-08 14:18   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 2/8] perf hisi-ptt: Complete the field names for 4DW and 8DW packets Sizhe Liu
2026-09-08 14:12   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 3/8] perf hisi-ptt: Extract the raw data printing part Sizhe Liu
2026-09-08 14:10   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 4/8] perf hisi-ptt: Merge 4DW and 8DW HEAD0 printing Sizhe Liu
2026-09-08 14:11   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 5/8] perf hisi-ptt: Add parsing of supported message types and proto length Sizhe Liu
2026-09-08 14:16   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 6/8] perf hisi-ptt: Add field-level parsing for header DW0/DW1/DW2/DW3 Sizhe Liu
2026-09-08 14:17   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 7/8] hwtracing: hisi_ptt: Add pattern PMU config for trace format selection Sizhe Liu
2026-09-08 14:19   ` sashiko-bot
2026-09-08 14:05 ` [PATCH v4 8/8] perf hisi-ptt: Pass pattern version to decoder for compatibility Sizhe Liu
2026-09-08 14:28   ` sashiko-bot [this message]
2026-09-08 21:02 ` [PATCH v4 0/8] Enhance TLP packet decoder with field-level parsing and versioning Arnaldo Carvalho de Melo
2026-09-11  6:41   ` Sizhe Liu

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=20260908142816.370DE1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=liusizhe5@huawei.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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