linux-bl808/tools/perf/util
Qi Liu 5e91e57e68 perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet
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: Qi Liu <liuqi115@huawei.com>
Signed-off-by: Yicong 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-10-15 10:13:16 -03:00
..
arm-spe-decoder
bpf_skel perf stat: Support old kernels for bperf cgroup counting 2022-10-14 10:29:05 -03:00
c++
cs-etm-decoder
hisi-ptt-decoder perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet 2022-10-15 10:13:16 -03:00
include
intel-pt-decoder
libunwind
scripting-engines
affinity.c
affinity.h
amd-sample-raw.c
annotate.c
annotate.h
archinsn.h
arm-spe.c
arm-spe.h
arm64-frame-pointer-unwind-support.c
arm64-frame-pointer-unwind-support.h
auxtrace.c perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet 2022-10-15 10:13:16 -03:00
auxtrace.h perf auxtrace arm64: Add support for HiSilicon PCIe Tune and Trace device driver 2022-10-15 10:13:16 -03:00
block-info.c
block-info.h
block-range.c
block-range.h
bpf-event.c
bpf-event.h
bpf-loader.c
bpf-loader.h
bpf-prologue.c
bpf-prologue.h
bpf-utils.c
bpf-utils.h
bpf_counter.c
bpf_counter.h
bpf_counter_cgroup.c
bpf_ftrace.c
bpf_kwork.c
bpf_lock_contention.c perf lock: Remove unused struct lock_contention_key 2022-10-06 08:03:52 -03:00
bpf_map.c
bpf_map.h
bpf_off_cpu.c
branch.c
branch.h
Build perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet 2022-10-15 10:13:16 -03:00
build-id.c
build-id.h
cache.h
cacheline.c
cacheline.h
call-path.c
call-path.h
callchain.c
callchain.h
cap.c
cap.h
cgroup.c
cgroup.h
clockid.c
clockid.h
cloexec.c
cloexec.h
color.c
color.h
color_config.c
comm.c
comm.h
compress.h
config.c
config.h
copyfile.c
copyfile.h
counts.c
counts.h
cpu-set-sched.h
cpumap.c perf stat: Rename to aggr_cpu_id.thread_idx 2022-10-06 08:03:53 -03:00
cpumap.h perf stat: Rename to aggr_cpu_id.thread_idx 2022-10-06 08:03:53 -03:00
cputopo.c
cputopo.h
cs-etm.c
cs-etm.h
data-convert-bt.c
data-convert-json.c
data-convert.h
data.c
data.h
db-export.c
db-export.h
debug.c
debug.h
demangle-java.c
demangle-java.h
demangle-ocaml.c
demangle-ocaml.h
demangle-rust.c
demangle-rust.h
dlfilter.c
dlfilter.h
dso.c
dso.h
dsos.c
dsos.h
dump-insn.c
dump-insn.h
dwarf-aux.c
dwarf-aux.h
dwarf-regs.c
env.c
env.h
event.c
event.h
events_stats.h
evlist-hybrid.c
evlist-hybrid.h
evlist.c perf tools: Add evlist__add_sched_switch() 2022-10-06 08:03:53 -03:00
evlist.h perf tools: Add evlist__add_sched_switch() 2022-10-06 08:03:53 -03:00
evsel.c perf tools: Remove special handling of system-wide evsel 2022-10-06 08:03:53 -03:00
evsel.h
evsel_config.h
evsel_fprintf.c
evsel_fprintf.h
evswitch.c
evswitch.h
expr.c perf expr: Remove jevents case workaround 2022-10-06 08:03:52 -03:00
expr.h
expr.l
expr.y perf expr: Allow a double if expression 2022-10-06 08:03:52 -03:00
find-map.c
fncache.c
fncache.h
ftrace.h
genelf.c
genelf.h perf inject: Fix GEN_ELF_TEXT_OFFSET for jit 2022-10-15 10:13:16 -03:00
genelf_debug.c
generate-cmdlist.sh
get_current_dir_name.c
get_current_dir_name.h
hashmap.c
hashmap.h
header.c
header.h
help-unknown-cmd.c
help-unknown-cmd.h
hisi-ptt.c perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet 2022-10-15 10:13:16 -03:00
hisi-ptt.h perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet 2022-10-15 10:13:16 -03:00
hist.c
hist.h
intel-bts.c
intel-bts.h
intel-pt.c perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc 2022-10-15 10:13:16 -03:00
intel-pt.h
intlist.c
intlist.h
iostat.c
iostat.h
jit.h
jitdump.c perf jit: Remove unused struct debug_line_info 2022-10-06 08:03:51 -03:00
jitdump.h
kvm-stat.h
kwork.h
levenshtein.c
levenshtein.h
llvm-utils.c
llvm-utils.h
lock-contention.h perf lock contention: Fix a build error on 32-bit 2022-10-06 08:03:51 -03:00
lzma.c
machine.c perf machine: Remove unused struct process_args 2022-10-06 08:03:51 -03:00
machine.h
map.c
map.h
map_symbol.h
maps.c
maps.h
mem-events.c perf mem: Print "LFB/MAB" for PERF_MEM_LVLNUM_LFB 2022-10-06 16:32:05 -03:00
mem-events.h
mem2node.c
mem2node.h
memswap.c
memswap.h
metricgroup.c perf metric: Remove unused struct metric_ref_node 2022-10-06 08:03:51 -03:00
metricgroup.h
mmap.c
mmap.h
mutex.c
mutex.h
namespaces.c
namespaces.h
off_cpu.h
ordered-events.c
ordered-events.h
parse-branch-options.c
parse-branch-options.h
parse-events-hybrid.c
parse-events-hybrid.h
parse-events.c perf: Skip and warn on unknown format 'configN' attrs 2022-10-14 12:23:09 -03:00
parse-events.h
parse-events.l
parse-events.y
parse-regs-options.c
parse-regs-options.h
parse-sublevel-options.c
parse-sublevel-options.h
path.c
path.h
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
PERF-VERSION-GEN perf tools: Fix empty version number when building outside of a git repo 2022-10-06 08:03:52 -03:00
perf_api_probe.c
perf_api_probe.h
perf_event_attr_fprintf.c
perf_regs.c
perf_regs.h
pfm.c
pfm.h
pmu-hybrid.c
pmu-hybrid.h
pmu.c perf: Skip and warn on unknown format 'configN' attrs 2022-10-14 12:23:09 -03:00
pmu.h perf: Skip and warn on unknown format 'configN' attrs 2022-10-14 12:23:09 -03:00
pmu.l perf: Skip and warn on unknown format 'configN' attrs 2022-10-14 12:23:09 -03:00
pmu.y perf: Skip and warn on unknown format 'configN' attrs 2022-10-14 12:23:09 -03:00
print-events.c
print-events.h
print_binary.c
print_binary.h
probe-event.c
probe-event.h
probe-file.c
probe-file.h
probe-finder.c
probe-finder.h
pstack.c
pstack.h
python-ext-sources
python.c
rb_resort.h
rblist.c
rblist.h
record.c
record.h
rlimit.c
rlimit.h
rwsem.c
rwsem.h
s390-cpumcf-kernel.h
s390-cpumsf-kernel.h
s390-cpumsf.c
s390-cpumsf.h
s390-sample-raw.c
sample-raw.c
sample-raw.h
session.c
session.h
setns.c
setup.py
sideband_evlist.c
smt.c
smt.h
sort.c
sort.h
spark.c
spark.h
srccode.c
srccode.h
srcline.c
srcline.h
stat-display.c perf stat: Fix cpu check to use id.cpu.cpu in aggr_printout() 2022-10-06 14:50:55 -03:00
stat-shadow.c perf stat: Don't compare runtime stat for shadow stats 2022-10-06 08:03:53 -03:00
stat.c perf stat: Use thread map index for shadow stat 2022-10-06 08:03:53 -03:00
stat.h perf stat: Kill unused per-thread runtime stats 2022-10-06 08:03:53 -03:00
strbuf.c
strbuf.h
stream.c
stream.h
strfilter.c
strfilter.h
string.c perf string: Remove unused macro K() 2022-10-04 08:55:23 -03:00
string2.h
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol-elf.c
symbol-minimal.c
symbol.c
symbol.h
symbol_conf.h
symbol_fprintf.c
symsrc.h
synthetic-events.c perf record: Save DSO build-ID for synthesizing 2022-10-06 11:12:14 -03:00
synthetic-events.h
syscalltbl.c
syscalltbl.h
target.c
target.h
term.c
term.h
thread-stack.c
thread-stack.h
thread.c
thread.h
thread_map.c
thread_map.h
time-utils.c
time-utils.h
tool.h
top.c
top.h
topdown.c
topdown.h
trace-event-info.c
trace-event-parse.c
trace-event-read.c
trace-event-scripting.c
trace-event.c
trace-event.h
tracepoint.c
tracepoint.h
trigger.h
tsc.c
tsc.h
units.c
units.h
unwind-libdw.c
unwind-libdw.h
unwind-libunwind-local.c
unwind-libunwind.c
unwind.h
usage.c
util.c
util.h
values.c
values.h
vdso.c
vdso.h
zlib.c
zstd.c