Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

[SPE] Add --dump-raw-trace support in wperf record #62

@PrzemekWirkus

Description

@PrzemekWirkus

Description

We can add new command line option for wperf sample / record with SPE is used, --dump-raw-trace.
We already have SPE raw buffer parser which can detect packets and records. We also store spe.data buffer which contains this buffer.

Example raw SPE fill buffer text output could be:

Output will contain raw SPE data and its textual representation, such as:

0xc7d0 [0x30]: PERF_RECORD_AUXTRACE size: 0x82f70  offset: 0  ref: 0x1e947e88189  idx: 0  tid: -1  cpu: 2
.
. ... ARM SPE data: size 536432 bytes
.  00000000:  4a 01                                           B COND
.  00000002:  b1 00 00 00 00 00 00 00 80                      TGT 0 el0 ns=1
.  0000000b:  42 42                                           RETIRED NOT-TAKEN
.  0000000d:  b0 20 41 c0 ad ff ff 00 80                      PC ffffadc04120 el0 ns=1
.  00000016:  98 00 00                                        LAT 0 TOT
.  00000019:  71 80 3e f7 46 e9 01 00 00                      TS 2101429616256
.  00000022:  49 01                                           ST
.  00000024:  b2 50 bd ba 73 00 80 ff ff                      VA ffff800073babd50
.  0000002d:  b3 50 bd ba f3 00 00 00 80                      PA f3babd50 ns=1
.  00000036:  9a 00 00                                        LAT 0 XLAT
.  00000039:  42 16                                           RETIRED L1D-ACCESS TLB-ACCESS
.  0000003b:  b0 8c b4 1e 08 00 00 ff ff                      PC ff0000081eb48c el3 ns=1
.  00000044:  98 00 00                                        LAT 0 TOT
.  00000047:  71 cc 44 f7 46 e9 01 00 00                      TS 2101429617868
.  00000050:  48 00                                           INSN-OTHER
.  00000052:  42 02                                           RETIRED
.  00000054:  b0 58 54 1f 08 00 00 ff ff                      PC ff0000081f5458 el3 ns=1
.  0000005d:  98 00 00                                        LAT 0 TOT
.  00000060:  71 cc 44 f7 46 e9 01 00 00                      TS 2101429617868

Note: this function can be used in the future also in wperf report - a new feature we can add in the future.

See example from perf tools: Add ARM Statistical Profiling Extensions (SPE) support.

Definition of done

  • Add new command line option --dump-raw-trace.
  • Add parser output to SPE JSON (sampling) output.
  • [TBD] Add raw spe.buffer to SPE JSON (sampling) output.
  • Verify output from this implementation with spe-parser provided with Telemetry Solution. You can find spe-parser in TS Gitlab repo.
    • Note: spe-parser should have new option -r/--raw-buffer that will treat input file
      as a raw SPE fill buffer content. It will allow you to output for the same spe.data file SPE packets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions