gcc -g -O3 -fPIC variant/memset_new.c -Dmemset_new=memset_new2 -c -o variant/memset_new.o gcc backtrace.c -fPIC -c # do not add -O gcc -g -Dfunction_no=`./test_sse` -DFNAME='"/home/testuser/ldmitrie/memset_profile/data_profile"' variant/memset_new.s variant/memset_new.o -O1 hooks.c backtrace.o -shared -ldl -fPIC -g -o libc_profile.so make reset make[1]: Entering directory `/home/testuser/ldmitrie/memset_profile' dd if=/dev/zero of=/home/testuser/ldmitrie/memset_profile/data_profile count=4000 2> /dev/null chmod a+rw /home/testuser/ldmitrie/memset_profile/data_profile make[1]: Leaving directory `/home/testuser/ldmitrie/memset_profile' Now add prefix LD_PRELOAD=/home/testuser/ldmitrie/memset_profile/libc_profile.so to programs you want to measure. When done run /home/testuser/ldmitrie/memset_profile/report. You can zero counters by running make again. simplest way to generate report is by make rep This generates html page /home/testuser/ldmitrie/memset_profile/results/result.html Or use make bench_gcc to run simple benchmark dd if=/dev/zero of=/home/testuser/ldmitrie/memset_profile/data_profile count=4000 2> /dev/null chmod a+rw /home/testuser/ldmitrie/memset_profile/data_profile ./benchmarks: line 4: 32420 Segmentation fault (core dumped) LD_PRELOAD=./libc_profile.so tests/rand gcc -g -O1 -Dfunction_no=`./test_sse` variant/memset_new.s variant/memset_new.o -DFNAME='"/home/testuser/ldmitrie/memset_profile/data_profile"' report.c -o report -g mkdir results cp -r doc results ./report > results/x cd results; sh x > result.html Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] tar -cjf results.tar.bz2 results rm: cannot remove ‘results_rand’: No such file or directory dd if=/dev/zero of=/home/testuser/ldmitrie/memset_profile/data_profile count=4000 2> /dev/null chmod a+rw /home/testuser/ldmitrie/memset_profile/data_profile ./benchmarks: line 10: 32492 Segmentation fault (core dumped) LD_PRELOAD=./libc_profile.so tests/rand_nocache gcc -g -O1 -Dfunction_no=`./test_sse` variant/memset_new.s variant/memset_new.o -DFNAME='"/home/testuser/ldmitrie/memset_profile/data_profile"' report.c -o report -g mkdir results mkdir: cannot create directory ‘results’: File exists make: [rep] Error 1 (ignored) cp -r doc results ./report > results/x cd results; sh x > result.html Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] tar -cjf results.tar.bz2 results rm: cannot remove ‘results_rand_nocache’: No such file or directory dd if=/dev/zero of=/home/testuser/ldmitrie/memset_profile/data_profile count=4000 2> /dev/null chmod a+rw /home/testuser/ldmitrie/memset_profile/data_profile ./benchmarks: line 16: 32564 Segmentation fault (core dumped) LD_PRELOAD=./libc_profile.so tests/rand_noicache gcc -g -O1 -Dfunction_no=`./test_sse` variant/memset_new.s variant/memset_new.o -DFNAME='"/home/testuser/ldmitrie/memset_profile/data_profile"' report.c -o report -g mkdir results mkdir: cannot create directory ‘results’: File exists make: [rep] Error 1 (ignored) cp -r doc results ./report > results/x cd results; sh x > result.html Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] tar -cjf results.tar.bz2 results rm: cannot remove ‘results_rand_noicache’: No such file or directory dd if=/dev/zero of=/home/testuser/ldmitrie/memset_profile/data_profile count=4000 2> /dev/null chmod a+rw /home/testuser/ldmitrie/memset_profile/data_profile LD_PRELOAD=/home/testuser/ldmitrie/memset_profile/libc_profile.so make rep make: *** [bench_gcc] Segmentation fault (core dumped) gcc -g -O1 -Dfunction_no=`./test_sse` variant/memset_new.s variant/memset_new.o -DFNAME='"/home/testuser/ldmitrie/memset_profile/data_profile"' report.c -o report -g mkdir results mkdir: cannot create directory ‘results’: File exists make: [rep] Error 1 (ignored) cp -r doc results ./report > results/x cd results; sh x > result.html Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] Warning: empty y range [0:0], adjusting to [-1:1] tar -cjf results.tar.bz2 results rm: cannot remove ‘results_gcc’: No such file or directory