llvm/lldb
Walter Erquinigo 602497d672 [trace] [intel pt] Create a "process trace save" command
added new command "process trace save -d <directory>".
-it saves a JSON file as <directory>/trace.json, with the main properties of the trace session.
-it saves binary Intel-pt trace as <directory>/thread_id.trace; each file saves each thread.
-it saves modules to the directory <directory>/modules .
-it only works for live process and it only support Intel-pt right now.

Example:
```
b main
run
process trace start
n
process trace save -d /tmp/mytrace
```
A file named trace.json and xxx.trace should be generated in /tmp/mytrace. To load the trace that was just saved:
```
trace load /tmp/mytrace
thread trace dump instructions
```
You should see the instructions of the trace got printed.

To run a test:
```
cd ~/llvm-sand/build/Release/fbcode-x86_64/toolchain
ninja lldb-dotest
./bin/lldb-dotest -p TestTraceSave
```

Reviewed By: wallace

Differential Revision: https://reviews.llvm.org/D107669
2021-08-27 09:34:01 -07:00
..
bindings
cmake [lldb] [cmake] Add LLVM_LIT_ARGS override support for standalone builds 2021-08-09 23:36:01 +02:00
docs [tests] [trace] Add a more comprehensive test for thread trace export ctf command 2021-08-11 20:50:10 -07:00
examples
include/lldb [trace] [intel pt] Create a "process trace save" command 2021-08-27 09:34:01 -07:00
packages/Python [test] Migrate -gcc-toolchain with space separator to --gcc-toolchain= 2021-08-20 15:24:58 -07:00
resources
scripts
source [trace] [intel pt] Create a "process trace save" command 2021-08-27 09:34:01 -07:00
test [trace] [intel pt] Create a "process trace save" command 2021-08-27 09:34:01 -07:00
third_party/Python/module [LLDB] Change pexpect timeout to 30 to 60 2021-08-02 06:34:11 +05:00
tools Fix two bugs with stack corefiles patch, restrict test built debugserver 2021-08-11 17:19:31 -07:00
unittests [lldb][NFC] Remove unused method RichManglingContext::IsFunction 2021-08-23 11:45:55 -07:00
utils
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [lldb] skip host build for lldb_tblgen with LLDB_TABLEGEN_EXE set 2021-08-13 14:18:03 -07:00
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py