diff options
author | Walter Erquinigo <wallace@fb.com> | 2021-08-27 09:31:41 -0700 |
---|---|---|
committer | Walter Erquinigo <wallace@fb.com> | 2021-08-27 09:34:01 -0700 |
commit | 602497d672ca66f3f0e59adca35f00199f266810 (patch) | |
tree | 3700e1f3448f70a0c3663d34d9ebb44b4565eff3 /libcxx/include/__algorithm/generate.h | |
parent | 8e284be04f2cd43a821289133a759afa2844f935 (diff) | |
download | llvm-602497d672ca66f3f0e59adca35f00199f266810.zip llvm-602497d672ca66f3f0e59adca35f00199f266810.tar.gz llvm-602497d672ca66f3f0e59adca35f00199f266810.tar.bz2 |
[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
Diffstat (limited to 'libcxx/include/__algorithm/generate.h')
0 files changed, 0 insertions, 0 deletions