[Lldb-commits] [PATCH] D130805: Support a new kernel section in LLDB’s trace bundle schema
Sujin Park via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 29 16:06:21 PDT 2022
persona0220 created this revision.
persona0220 added reviewers: wallace, jj10306.
Herald added a project: All.
persona0220 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130805
Files:
lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h
lldb/test/API/commands/trace/TestTraceLoad.py
lldb/test/API/commands/trace/intelpt-kernel-trace/cores/45.intelpt_trace
lldb/test/API/commands/trace/intelpt-kernel-trace/cores/45.perf_context_switch_trace
lldb/test/API/commands/trace/intelpt-kernel-trace/cores/51.intelpt_trace
lldb/test/API/commands/trace/intelpt-kernel-trace/cores/51.perf_context_switch_trace
lldb/test/API/commands/trace/intelpt-kernel-trace/modules/m.out
lldb/test/API/commands/trace/intelpt-kernel-trace/trace.json
lldb/test/API/commands/trace/intelpt-kernel-trace/trace_kernel_with_process.json
lldb/test/API/commands/trace/intelpt-kernel-trace/trace_kernel_wo_cpus.json
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130805.448734.patch
Type: text/x-patch
Size: 17746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220729/ebe7815f/attachment-0001.bin>
More information about the lldb-commits
mailing list