first commit
This commit is contained in:
commit
5e6b1c865a
5 changed files with 65 additions and 0 deletions
BIN
bcc_tracing_tools.png
Normal file
BIN
bcc_tracing_tools.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 288 KiB |
BIN
bpf_performance_tools_book.png
Normal file
BIN
bpf_performance_tools_book.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 984 KiB |
BIN
offcputracing-1000.png
Normal file
BIN
offcputracing-1000.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
BIN
tsa.png
Normal file
BIN
tsa.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
65
workshop1_slides.txt
Executable file
65
workshop1_slides.txt
Executable file
|
|
@ -0,0 +1,65 @@
|
||||||
|
#!/usr/bin/env sent
|
||||||
|
|
||||||
|
# install sent with:
|
||||||
|
# git clone https://git.suckless.org/sent && cd sent && sudo make install
|
||||||
|
|
||||||
|
#Welcome
|
||||||
|
|
||||||
|
Choose a server to profile
|
||||||
|
- check top for activity
|
||||||
|
- open wavefront machine analysis
|
||||||
|
- check $(uname -r) before you start
|
||||||
|
|
||||||
|
# wget http://www.brendangregg.com/Perf/bcc_tracing_tools.png
|
||||||
|
@bcc_tracing_tools.png
|
||||||
|
|
||||||
|
# wget http://www.brendangregg.com/BPF/bpf_performance_tools_book.png
|
||||||
|
@bpf_performance_tools_book.png
|
||||||
|
|
||||||
|
|
||||||
|
\# For linux 4.4+
|
||||||
|
sudo perf record -F99 -a -g -- sleep 30
|
||||||
|
sudo perf script --header > stacks
|
||||||
|
-------------------------------------------------------
|
||||||
|
\# For linux 4.9+
|
||||||
|
sudo profile -F99 -df 30 > stacks
|
||||||
|
|
||||||
|
ctool scp d99-usw-2:stacks .
|
||||||
|
git clone https://github.com/brendangregg/FlameGraph.git && cd FlameGraph
|
||||||
|
./stackcollapse-perf.pl <stacks >collapsed #ONLY FOR PERF/DTRACE
|
||||||
|
./flamegraph.pl <collapsed >flamegraph.svg
|
||||||
|
open flamegraph.svg
|
||||||
|
|
||||||
|
kernel symbols?
|
||||||
|
- sudo apt install linux-image-$(uname -r)-dbgsym
|
||||||
|
- echo 0 | sudo tee /proc/sys/kernel/kptr_restrict
|
||||||
|
\
|
||||||
|
ubuntu package symbols?
|
||||||
|
- sudo apt install $(pkgname)-dbgsym
|
||||||
|
|
||||||
|
flamescope @ http://10.0.33.119:5000
|
||||||
|
|
||||||
|
refining the graphs
|
||||||
|
- filter by PID
|
||||||
|
- filter a given function call/syscall
|
||||||
|
- --color=js,java
|
||||||
|
- --color=io
|
||||||
|
- c++filt
|
||||||
|
\
|
||||||
|
./stackcollapse-perf.html < out.stacks | grep do_command | c++filt | \
|
||||||
|
./flamegraph.pl --color=io --title="Block I/O Flame Graph" --countname="I/O" > out.svg
|
||||||
|
|
||||||
|
#see http://www.brendangregg.com/blog/2014-11-09/differential-flame-graphs.html
|
||||||
|
"differential" flamegraphs
|
||||||
|
./difffolded.pl stacksA stacksB | ./flamegraph.pl > diff_flamegraph.svg
|
||||||
|
|
||||||
|
@tsa.png
|
||||||
|
|
||||||
|
@offcputracing-1000.png
|
||||||
|
|
||||||
|
"off-cpu" flamegraphs (man offcputime)
|
||||||
|
-> sudo offcputime -df > stacks
|
||||||
|
also hot/cold flamegraphs (on+off cpu)
|
||||||
|
|
||||||
|
"wakeup" flamegraphs
|
||||||
|
-> sudo wakeuptime -f > stacks
|
||||||
Loading…
Reference in a new issue