|
|
Log in / Subscribe / Register

perf hisi-ptt: Enhance TLP packet decoder with field-level parsing and versioning

From:  Sizhe Liu <liusizhe5-AT-huawei.com>
To:  <rostedt-AT-goodmis.org>, <mhiramat-AT-kernel.org>, <mathieu.desnoyers-AT-efficios.com>, <corbet-AT-lwn.net>, <skhan-AT-linuxfoundation.org>, <bhelgaas-AT-google.com>, <yangyccccc-AT-gmail.com>, <jic23-AT-kernel.org>, <john.g.garry-AT-oracle.com>, <will-AT-kernel.org>, <james.clark-AT-linaro.org>, <mike.leach-AT-arm.com>, <leo.yan-AT-linux.dev>, <peterz-AT-infradead.org>, <mingo-AT-redhat.com>, <acme-AT-kernel.org>, <namhyung-AT-kernel.org>, <mark.rutland-AT-arm.com>, <alexander.shishkin-AT-linux.intel.com>, <jolsa-AT-kernel.org>, <irogers-AT-google.com>, <adrian.hunter-AT-intel.com>, <wangyushan12-AT-huawei.com>, <shenyang39-AT-huawei.com>, <gaozhihao6-AT-h-partners.com>, <yuzhichengcheng-AT-h-partners.com>, <liyihang9-AT-h-partners.com>
Subject:  [PATCH 00/10] perf hisi-ptt: Enhance TLP packet decoder with field-level parsing and versioning
Date:  Thu, 04 Jun 2026 15:49:55 +0800
Message-ID:  <20260604075005.2219785-1-liusizhe5@huawei.com>
Cc:  <linux-kernel-AT-vger.kernel.org>, <linux-pci-AT-vger.kernel.org>, <linux-perf-users-AT-vger.kernel.org>, <linux-arm-kernel-AT-lists.infradead.org>, <linux-doc-AT-vger.kernel.org>, <linuxarm-AT-huawei.com>, <prime.zeng-AT-hisilicon.com>, <fanghao11-AT-huawei.com>, <wuyifan50-AT-huawei.com>, <liusizhe5-AT-huawei.com>
Archive-link:  Article

This series enhances the HiSilicon PTT (PCIe Trace and Tuning) packet
decoder in perf to provide detailed field-level parsing of TLP headers
based on message type, and adds a versioning mechanism for backward
compatibility.
The original decoder only prints raw hex values with generic field
names for each DW, without classifying TLP types or decoding
DW2/DW3 fields according to the hardware-defined packet format.
Patch overview:
  Patches 1-2: Bug fixes
    - Fix spelling/abbreviation errors (FIELD_LENTH, kpt_desc)
    - Fix DW0 bit field ordering and DW hex value printing
  Patches 3-7: Refactoring for field-level parsing
    - Rename union and add named struct member for multi-DW reuse
    - Abstract trace buffer/offset into struct hisi_ptt_pkt_buf
    - Complete missing field name entries in 4DW/8DW tables
    - Extract raw data printing into function
    - Unify 4DW/8DW HEAD0 printing into hisi_ptt_print_head0()
  Patch 8: TLP message type classification
    - Parse Format/Type from DW0 to classify packets as
      MWr/Msg/Atomic/IO/Cfg/Cpl
  Patch 9: Field-level DW2/DW3 parsing
    - Decode DW2 fields for MWr/Msg/Atomic/IO TLPs
    - Decode DW3 fields for Completion and Configuration TLPs
  Patch 10: Version compatibility
    - Add V1/V2 version in auxtrace info to distinguish old
      (generic field names) from new (detailed field parsing)
      trace data, with backward compatibility for V1 files

Sizhe Liu (10):
  perf hisi-ptt: Fix spelling and abbreviation errors
  perf hisi-ptt: Fix PTT trace TLP Header parsing
  perf hisi-ptt: Rename hisi_ptt_4dw union for reuse
  perf hisi-ptt: Abstract trace data buf and offset
  perf hisi-ptt: Complete the field names for 4DW and 8DW packets
  perf hisi-ptt: Extract the raw data printing part
  perf hisi-ptt: Merge 4DW and 8DW HEAD0 printing
  perf hisi-ptt: Add parsing of supported message types
  perf hisi-ptt: Add field-level parsing for header DW2/DW3
  perf hisi-ptt: Add decoder version compatibility

 Documentation/trace/hisi-ptt.rst              |  28 +-
 tools/perf/arch/arm64/util/hisi-ptt.c         |   2 +
 .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c   | 352 +++++++++++++++---
 .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.h   |  27 +-
 tools/perf/util/hisi-ptt.c                    |  46 ++-
 tools/perf/util/hisi-ptt.h                    |   4 +-
 6 files changed, 365 insertions(+), 94 deletions(-)

-- 
2.33.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds