diff --git a/build/unix/run-gprof.sh b/build/unix/run-gprof.sh new file mode 100644 index 00000000000..ae7c49d39d6 --- /dev/null +++ b/build/unix/run-gprof.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +LD_LIBRARY_PATH=. +export LD_LIBRARY_PATH + +PROG=mozilla-bin +PLIBS="" + +for l in *.so components/*.so; do + PLIBS="$PLIBS -incobj $l" +done + +$ECHO /bin/gprof -L. -Lcomponents -all $PLIBS $PROG $PROG.hiout diff --git a/build/unix/run-hiprof.sh b/build/unix/run-hiprof.sh new file mode 100644 index 00000000000..8c880562858 --- /dev/null +++ b/build/unix/run-hiprof.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +LD_LIBRARY_PATH=. +export LD_LIBRARY_PATH + +PROG=mozilla-bin +PLIBS="-L." + +for l in ./*.so components/*.so; do + PLIBS="$PLIBS -incobj $l" +done + +$ECHO atom $PROG -tool hiprof -env threads -toolargs="-calltime -systime" -all $PLIBS + +cd components && ( + for f in lib*.so; do + mv ../$f.hiprof.threads . + done +)