File tree Expand file tree Collapse file tree 3 files changed +10
-13
lines changed Expand file tree Collapse file tree 3 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 33cflags=' -ggdb3 -O0 -std=c99 -Wall -Wextra -pedantic'
44output_file=" ${1:- res.log} "
55rm -f " $output_file "
6- /usr/bin/time --append --format ' nogold: wall=%es user=%Us system=%Ss %MkB' --output " $output_file " gcc $cflags -o main * .o
7- /usr/bin/time --append --format ' gold: wall=%es user=%Us system=%Ss %MkB' --output " $output_file " gcc $cflags -fuse-ld=gold -o main * .o
6+ echo nogold
7+ /usr/bin/time --append --format ' nogold: wall=%es user=%Us system=%Ss %MkB' --output " $output_file " gcc $cflags -o main * .o
8+ echo gold
9+ /usr/bin/time --append --format ' gold: wall=%es user=%Us system=%Ss %MkB' --output " $output_file " gcc $cflags -fuse-ld=gold -o main * .o
10+ echo lld
11+ /usr/bin/time --append --format ' lld: wall=%es user=%Us system=%Ss %MkB' --output " $output_file " gcc $cflags -fuse-ld=lld -o main * .o
Original file line number Diff line number Diff line change 33result_log=result.log
44rm -f " $result_log "
55for params in \
6- " 10000 1 1" \
7- " 1 10000 1" \
8- " 1 1 10000" \
9- " 10000 10 1" \
10- " 1000 100 1" \
11- " 100 1000 1" \
126 " 10000 10 10" \
137 " 1000 100 10" \
148 " 100 1000 10" \
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ cflags='-ggdb3 -O0 -std=c99 -Wall -Wextra -pedantic'
1818# Cleanup previous generated files objects.
1919./clean
2020
21- # Generate i_*.c, ints.h and int_sum.h
21+ echo " Generate i_*.c, ints.h and int_sum.h"
2222rm -f ints.h
2323echo ' return' > int_sum.h
2424int_file_i=0
@@ -27,7 +27,6 @@ while [ "$int_file_i" -lt "$n_int_file_is" ]; do
2727 int_file=" ${int_file_i} .c"
2828 rm -f " $int_file "
2929 while [ " $int_i " -lt " $n_ints_per_file " ]; do
30- echo " ${int_file_i} ${int_i} "
3130 int_sym=" i_${int_file_i} _${int_i} "
3231 echo " unsigned int ${int_sym} = ${int_file_i} ;" >> " $int_file "
3332 echo " extern unsigned int ${int_sym} ;" >> ints.h
@@ -38,7 +37,7 @@ while [ "$int_file_i" -lt "$n_int_file_is" ]; do
3837done
3938echo ' 1;' >> int_sum.h
4039
41- # Generate funcs.h and main.c.
40+ echo " Generate funcs.h and main.c."
4241rm -f funcs.h
4342cat << EOF >main.c
4443#include "funcs.h"
@@ -65,5 +64,5 @@ cat <<EOF >>main.c
6564}
6665EOF
6766
68- # Generate *.o
69- ls | grep -E ' \.c$' | parallel --halt now,fail=1 -t - -will-cite " gcc $cflags -c -o '{.}.o' '{}'"
67+ echo " Generate *.o"
68+ ls | grep -E ' \.c$' | parallel --halt now,fail=1 --will-cite " gcc $cflags -c -o '{.}.o' '{}'"
You can’t perform that action at this time.
0 commit comments