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