[all-commits] [llvm/llvm-project] 74c939: Add a "Trace" plug-in to LLDB to add process trace...
walter erquinigo via All-commits
all-commits at lists.llvm.org
Mon Sep 21 17:13:46 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 74c93956e1c1f1054dfb040ce26830016e0f3095
https://github.com/llvm/llvm-project/commit/74c93956e1c1f1054dfb040ce26830016e0f3095
Author: Walter Erquinigo <waltermelon at fb.com>
Date: 2020-09-21 (Mon, 21 Sep 2020)
Changed paths:
M lldb/include/lldb/Core/PluginManager.h
A lldb/include/lldb/Target/Trace.h
A lldb/include/lldb/Target/TraceSettingsParser.h
M lldb/include/lldb/lldb-forward.h
M lldb/include/lldb/lldb-private-interfaces.h
M lldb/source/Commands/CMakeLists.txt
A lldb/source/Commands/CommandObjectTrace.cpp
A lldb/source/Commands/CommandObjectTrace.h
M lldb/source/Commands/Options.td
M lldb/source/Core/PluginManager.cpp
M lldb/source/Interpreter/CommandInterpreter.cpp
M lldb/source/Plugins/CMakeLists.txt
A lldb/source/Plugins/Trace/CMakeLists.txt
A lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt
A lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
A lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
A lldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.cpp
A lldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.h
M lldb/source/Target/CMakeLists.txt
A lldb/source/Target/Trace.cpp
A lldb/source/Target/TraceSettingsParser.cpp
M lldb/source/Utility/StructuredData.cpp
A lldb/test/API/commands/trace/TestTraceLoad.py
A lldb/test/API/commands/trace/TestTraceSchema.py
A lldb/test/API/commands/trace/intelpt-trace/3842849.trace
A lldb/test/API/commands/trace/intelpt-trace/a.out
A lldb/test/API/commands/trace/intelpt-trace/main.cpp
A lldb/test/API/commands/trace/intelpt-trace/trace.json
A lldb/test/API/commands/trace/intelpt-trace/trace_bad.json
A lldb/test/API/commands/trace/intelpt-trace/trace_bad2.json
A lldb/test/API/commands/trace/intelpt-trace/trace_bad3.json
Log Message:
-----------
Add a "Trace" plug-in to LLDB to add process trace support in stages.
This is the first in a series of patches that will adds a new processor trace plug-in to LLDB.
The idea for this first patch to to add the plug-in interface with simple commands for the trace files that can "load" and "dump" the trace information. We can test the functionality and ensure people are happy with the way things are done and how things are organized before moving on to adding more functionality.
Processor trace information can be view in a few different ways:
- post mortem where a trace is saved off that can be viewed later in the debugger
- gathered while a process is running and allow the user to step back in time (with no variables, memory or registers) to see how each thread arrived at where it is currently stopped.
This patch attempts to start with the first solution of loading a trace file after the fact. The idea is that we will use a JSON file to load the trace information. JSON allows us to specify information about the trace like:
- plug-in name in LLDB
- path to trace file
- shared library load information so we can re-create a target and symbolicate the information in the trace
- any other info that the trace plug-in will need to be able to successfully parse the trace information
- cpu type
- version info
- ???
A new "trace" command was added at the top level of the LLDB commmands:
- "trace load"
- "trace dump"
I did this because if we load trace information we don't need to have a process and we might end up creating a new target for the trace information that will become active. If anyone has any input on where this would be better suited, please let me know. Walter Erquinigo will end up filling in the Intel PT specific plug-in so that it works and is tested once we can agree that the direction of this patch is the correct one, so please feel free to chime in with ideas on comments!
Reviewed By: clayborg
Differential Revision: https://reviews.llvm.org/D85705
More information about the All-commits
mailing list