-
Notifications
You must be signed in to change notification settings - Fork 226
Debug
Lei Xu edited this page May 6, 2023
·
2 revisions
# ~/.lldbinit
settings set stop-line-count-before 15
settings set stop-line-count-after 15
settings set target.load-cwd-lldbinit true
# /path/to/lance/python/.lldbinit
env DYLD_LIBRARY_PATH=/path/to/thirdparty/dist/lib:${DYLD_LIBRARY_PATH}
$ lldb ./venv/bin/python
(lldb) r script.py
First, install flamegraph
cargo install flamegraph
Install linux tools (pperf) on Ubuntu
sudo apt install linux-tools-common linux-tools-generic linux-tools-`uname -r`
sudo sh -c "echo -1 > /proc/sys/kernel/perf_event_paranoid"
flamegraph -p <PID>