Add script to run perf trace with USDT
parent
b215df32a8
commit
6c91b38205
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
EVENTS="sdt_wayvnc:* sdt_neatvnc:*"
|
||||
|
||||
delete_all_events()
|
||||
{
|
||||
for e in $EVENTS; do
|
||||
sudo perf probe -d "$e" || true
|
||||
done
|
||||
}
|
||||
|
||||
add_all_events()
|
||||
{
|
||||
for e in $EVENTS; do
|
||||
sudo perf probe "$e"
|
||||
done
|
||||
}
|
||||
|
||||
sudo perf buildid-cache -a build/wayvnc
|
||||
sudo perf buildid-cache -a build/subprojects/neatvnc/libneatvnc.so
|
||||
|
||||
delete_all_events
|
||||
add_all_events
|
||||
|
||||
trap "sudo chown $USER.$USER perf.data*" EXIT
|
||||
|
||||
sudo perf record -aR -e ${EVENTS/ /,}
|
||||
|
Loading…
Reference in New Issue