Skip to content

Commit

Permalink
Adding profiling helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Markuze committed Jan 8, 2023
1 parent 3d954d9 commit 51d1019
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helpers/collate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cat /tmp/profile.folded_*|perl -e 'while (<>) { s/^([\w-]+)[-_]\d*;/$1;/;printf"$_";}' > /tmp/profile.folded
cat /tmp/offcpu.folded_*|perl -e 'while (<>) { s/^([\w-]+)[-_]\d*;/$1;/;printf"$_";}' > /tmp/offcpu.folded
6 changes: 6 additions & 0 deletions helpers/collect.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
for i in `seq 0 7`; do
echo "bcc ./profile.py -f -p $PID -F 100 -a --stack-storage-size 2097152 3 > /tmp/profile.folded_$i"
sudo python3 ./profile.py -f -p $PID -F 100 -a --stack-storage-size 2097152 3 > /tmp/profile.folded_$i
echo "bcc ./offcputime.py -f -p $PID --stack-storage-size 2097152 3 > /tmp/offcpu.folded_$i"
sudo python3 ./offcputime.py -f -p $PID --stack-storage-size 2097152 3 > /tmp/offcpu.folded_$i
done

0 comments on commit 51d1019

Please sign in to comment.