diff options
| author | Morten Hustveit <morten.hustveit@gmail.com> | 2015-11-05 13:51:47 -0500 |
|---|---|---|
| committer | Morten Hustveit <morten.hustveit@gmail.com> | 2015-11-05 13:51:47 -0500 |
| commit | c1a4ed37fe2a1e069a9b827d0012cab38984ee8f (patch) | |
| tree | 45ffc7233b8bc234d876cab68b20b0664de35694 | |
| parent | 146e7d6cef639abc0e2015534a871a7d2710a889 (diff) | |
Add script to benchmark using -fprofile-use
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rwxr-xr-x | test-profile-arcs.sh | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index aa93cc4..1c47b0c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -Wall -Wextra -pedantic -std=c99 -flto +AM_CFLAGS = -Wall -pedantic -std=c99 -flto bin_PROGRAMS = ray ray-headless diff --git a/test-profile-arcs.sh b/test-profile-arcs.sh new file mode 100755 index 0000000..e8d390e --- /dev/null +++ b/test-profile-arcs.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +autoreconf -f -i + +echo >&2 "Baseline" +./configure CFLAGS='-O3 -march=native' CC=gcc >/dev/null +make clean >/dev/null +make >/dev/null +./ray-headless + + +echo >&2 "Profiling" +./configure CFLAGS='-O3 -march=native -fprofile-generate' CC=gcc >/dev/null +make clean >/dev/null +make >/dev/null +./ray-headless + +echo >&2 "Using profile" +./configure CFLAGS='-O3 -march=native -fprofile-use -fprofile-correction' CC=gcc >/dev/null +make clean >/dev/null +make >/dev/null +./ray-headless |
