diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-06 20:41:20 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-06 20:41:20 +0200 |
commit | 8c090e72d2737673926a9f32bec348e43f72e731 (patch) | |
tree | d52ed9cf981928a0275795e51d85402bb6d1081f /test | |
parent | 25d1f635c42f59f9f076ef137fe6bf277a396d6f (diff) | |
download | compcert-kvx-8c090e72d2737673926a9f32bec348e43f72e731.tar.gz compcert-kvx-8c090e72d2737673926a9f32bec348e43f72e731.zip |
Makefile for timing.
We are 12% slower than gcc.
Diffstat (limited to 'test')
-rw-r--r-- | test/monniaux/pcre2-10.32/Makefile | 7 | ||||
-rw-r--r-- | test/monniaux/pcre2-10.32/pcre2test.c | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/test/monniaux/pcre2-10.32/Makefile b/test/monniaux/pcre2-10.32/Makefile index b905f849..ae4316cb 100644 --- a/test/monniaux/pcre2-10.32/Makefile +++ b/test/monniaux/pcre2-10.32/Makefile @@ -1,6 +1,7 @@ -all: pcre2test.gcc.k1c pcre2test.ccomp.k1c +all: pcre2test.gcc.k1c.out pcre2test.ccomp.k1c.out ALL_CFLAGS = -DHAVE_CONFIG_H -DPCRE2_CODE_UNIT_WIDTH=8 +EXECUTE_ARGS = testdata/testinput6 include ../rules.mk @@ -45,10 +46,10 @@ K1C_CCOMP_OFILES=$(CFILES:.c=.ccomp.k1c.o) $(K1C_GCC_OFILES) $(K1C_CCOMP_OFILES): $(HFILES) pcre2test.gcc.k1c: $(K1C_GCC_OFILES) - $(K1C_CC) $(K1C_CFLAGS) -o $@ $+ + $(K1C_CC) $(K1C_CFLAGS) -o $@ $+ ../clock.gcc.k1c.o pcre2test.ccomp.k1c: $(K1C_CCOMP_OFILES) - $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -o $@ $+ + $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -o $@ $+ ../clock.gcc.k1c.o .PHONY: clean diff --git a/test/monniaux/pcre2-10.32/pcre2test.c b/test/monniaux/pcre2-10.32/pcre2test.c index 10d47469..25a7c4a1 100644 --- a/test/monniaux/pcre2-10.32/pcre2test.c +++ b/test/monniaux/pcre2-10.32/pcre2test.c @@ -66,6 +66,8 @@ it references only the enabled library functions. */ #include <locale.h> #include <errno.h> +/* DM */ +#include "../clock.h" int fileno(FILE *stream); #if defined NATIVE_ZOS @@ -8109,6 +8111,10 @@ char *arg_subject = NULL; char *arg_pattern = NULL; char *arg_error = NULL; +/* DM */ + clock_prepare(); + clock_start(); + /* The offsets to the options and control bits fields of the pattern and data control blocks must be the same so that common options and controls such as "anchored" or "memory" can work for either of them from a single table entry. @@ -8785,6 +8791,9 @@ FREECONTEXTS; yield = SS$_NORMAL; /* Return values via DCL symbols */ #endif + clock_stop(); + print_total_clock(); + return yield; } |