# download gprof-helper.c wget http://sam.zoy.org/writings/programming/gprof-helper.c # to build gprof-helper.so gcc -shared -fPIC gprof-helper.c -o gprof-helper.so -lpthread -ldl # compile libspmt without shared library creation # if this doesn't work, take away the --disable-shared and use # LDFLAGS="-static" ./configure ... # note that the order of these steps matters! ./configure --disable-debug --disable-assertions --enable-profiling --enable-wpa --prefix=$HOME/$HOSTTYPE --disable-shared # in order to find libspmt.so export LD_LIBRARY_PATH="$HOME/$HOSTTYPE/lib:$LD_LIBRARY_PATH" # in order to compile sablevm: ./build_full_profile # must be in the right dir for running the application cd ~/pldi_work/spec/jvm98/check/classes/sootOutput-full/ # to run the binary and generate gmon.out LD_PRELOAD=~/gprof-helper.so sablevm-chris-switch-spmt-debug-stats-magic ARGS MAINCLASS # to analyse with gprof gprof ~/x86_64/bin/sablevm-chris-switch-spmt-debug-stats-magic