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 3
3
cflags=' -ggdb3 -O0 -std=c99 -Wall -Wextra -pedantic'
4
4
output_file=" ${1:- res.log} "
5
5
rm -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 3
3
result_log=result.log
4
4
rm -f " $result_log "
5
5
for 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" \
12
6
" 10000 10 10" \
13
7
" 1000 100 10" \
14
8
" 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'
18
18
# Cleanup previous generated files objects.
19
19
./clean
20
20
21
- # Generate i_*.c, ints.h and int_sum.h
21
+ echo " Generate i_*.c, ints.h and int_sum.h"
22
22
rm -f ints.h
23
23
echo ' return' > int_sum.h
24
24
int_file_i=0
@@ -27,7 +27,6 @@ while [ "$int_file_i" -lt "$n_int_file_is" ]; do
27
27
int_file=" ${int_file_i} .c"
28
28
rm -f " $int_file "
29
29
while [ " $int_i " -lt " $n_ints_per_file " ]; do
30
- echo " ${int_file_i} ${int_i} "
31
30
int_sym=" i_${int_file_i} _${int_i} "
32
31
echo " unsigned int ${int_sym} = ${int_file_i} ;" >> " $int_file "
33
32
echo " extern unsigned int ${int_sym} ;" >> ints.h
@@ -38,7 +37,7 @@ while [ "$int_file_i" -lt "$n_int_file_is" ]; do
38
37
done
39
38
echo ' 1;' >> int_sum.h
40
39
41
- # Generate funcs.h and main.c.
40
+ echo " Generate funcs.h and main.c."
42
41
rm -f funcs.h
43
42
cat << EOF >main.c
44
43
#include "funcs.h"
@@ -65,5 +64,5 @@ cat <<EOF >>main.c
65
64
}
66
65
EOF
67
66
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