1 #!/bin/sh 2 platform=$1 3 LIBUNWIND=../src/.libs/libunwind.so 4 LIBUNWIND_PLAT=../src/.libs/libunwind-$platform.so 5 warmup=$(./forker 2000 /bin/true | cut -f1 -d' ') 6 7 nsec1=$(./forker 2000 /bin/true | cut -f1 -d' ') 8 printf "\"/bin/true\"\t\t\t\t\t\t: $nsec1 nsec/execution\n" 9 10 nsec2=$(LD_PRELOAD=$LIBUNWIND ./forker 2000 /bin/true | cut -f1 -d' ') 11 printf "\"LD_PRELOAD=$LIBUNWIND /bin/true\"\t: $nsec2 nsec/execution\n" 12 13 nsec3=$(LD_PRELOAD=$LIBUNWIND_PLAT ./forker 2000 /bin/true | cut -f1 -d' ') 14 printf "\"LD_PRELOAD=$LIBUNWIND_PLAT /bin/true\"\t: $nsec3 nsec/execution\n" 15 16 echo 17 18 printf "Overhead of preloading $LIBUNWIND\t: $(($nsec2 - $nsec1)) nsec\n" 19 printf "Overhead of preloading $LIBUNWIND_PLAT\t: $(($nsec3 - $nsec1)) nsec\n" 20