• Q
    perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet · 5e91e57e
    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 (8DW format):
    
    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 patch only add basic parsing support according to the definition of
    the PTT packet described in Documentation/trace/hisi-ptt.rst. And the
    fields of each packet can be further decoded following the PCIe Spec's
    definition of TLP packet.
    Signed-off-by: NQi Liu <liuqi115@huawei.com>
    Signed-off-by: NYicong Yang <yangyicong@hisilicon.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Bjorn Helgaas <helgaas@kernel.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: John Garry <john.garry@huawei.com>
    Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
    Cc: Mike Leach <mike.leach@linaro.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Qi Liu <liuqi6124@gmail.com>
    Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
    Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Zeng Prime <prime.zeng@huawei.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-pci@vger.kernel.org
    Cc: linuxarm@huawei.com
    Link: https://lore.kernel.org/r/20220927081400.14364-4-yangyicong@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    5e91e57e
Build 10.0 KB