mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
TOOL: Add profile script helper for dtrace.
This commit is contained in:
parent
ac66b468fd
commit
d9419a4aef
11
bin/dtrace_profile.sh
Executable file
11
bin/dtrace_profile.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# AUTHOR: Jeremy Wall (jw), jeremy@marzhillstudios.com
|
||||
set -x
|
||||
|
||||
file=$1
|
||||
|
||||
cargo build --release
|
||||
sudo dtrace -c "target/release/ucg build ${file}" -o out.stacks -n 'profile-997 /execname == "ucg"/ { @[ustack(100)] = count(); }'
|
||||
stackcollapse.pl out.stacks > collapsed.stacks
|
||||
cat collapsed.stacks | flamegraph.pl --minwidth 2.5 > perf_graph.svg
|
||||
rm -f out.stacks collapsed.stacks
|
Loading…
x
Reference in New Issue
Block a user