Files
clang-p2996/lldb/test/API/commands/trace/intelpt-kernel-trace/trace.json
Walter Erquinigo 6fb744be76 [trace][intel pt] Support a new kernel section in LLDB’s trace bundle schema
Add a new "kernel" section with following schema.

```
"kernel": {
  "loadAddress"?: decimal | hex string | string decimal
  # This is optional. If it's not specified, use default address 0xffffffff81000000.
  "file": string
  # path to the kernel image
}
```

Here's more details of the diff:
- If "kernel" section exist, it means current tracing mode is //KernelMode//.
- If tracing mode is //KernelMode//, the "processes" section must be empty and the "kernel" and "cpus" section must be provided. This is tested with `TestTraceLoad`.
- "kernel" section is parsed and turned into a new process with a single module which is the kernel image. The kernel process has N fake threads, one for each cpu.

Reviewed By: wallace

Differential Revision: https://reviews.llvm.org/D130805
2022-08-04 17:15:08 -07:00

30 lines
726 B
JSON

{
"cpus": [
{
"contextSwitchTrace": "../intelpt-multi-core-trace/cores/45.perf_context_switch_trace",
"id": 45,
"iptTrace": "../intelpt-multi-core-trace/cores/45.intelpt_trace"
},
{
"contextSwitchTrace": "../intelpt-multi-core-trace/cores/51.perf_context_switch_trace",
"id": 51,
"iptTrace": "../intelpt-multi-core-trace/cores/51.intelpt_trace"
}
],
"cpuInfo": {
"family": 6,
"model": 85,
"stepping": 4,
"vendor": "GenuineIntel"
},
"tscPerfZeroConversion": {
"timeMult": 1076264588,
"timeShift": 31,
"timeZero": 18433473881008870804
},
"kernel": {
"file": "../intelpt-multi-core-trace/modules/m.out"
},
"type": "intel-pt"
}