aboutsummaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-03-21 16:35:48 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-03-21 16:36:04 +0530
commit3775a8bc2d2e0c29c8a7e673f5f42537ced2b3c7 (patch)
treeaa17bb58b7fe31e4badfa1bce35ad2df5f3bbf61 /Rules
parent0a1b2ae6f6d511519ab3c0ccbf54982ae65bc444 (diff)
downloadglibc-3775a8bc2d2e0c29c8a7e673f5f42537ced2b3c7.tar
glibc-3775a8bc2d2e0c29c8a7e673f5f42537ced2b3c7.tar.gz
glibc-3775a8bc2d2e0c29c8a7e673f5f42537ced2b3c7.tar.bz2
glibc-3775a8bc2d2e0c29c8a7e673f5f42537ced2b3c7.zip
Allow adding of arbitrary code to benchmark tests
This allows us to define custom functions in C code files and benchmark scenarios rather than just functions. The main current use of this is to separate the slow and fast path benchmarks for math functions.
Diffstat (limited to 'Rules')
-rw-r--r--Rules6
1 files changed, 5 insertions, 1 deletions
diff --git a/Rules b/Rules
index bc5dacd2f6..02cdb4ac78 100644
--- a/Rules
+++ b/Rules
@@ -210,8 +210,12 @@ $(binaries-bench): %: %.o \
$(+link)
$(objpfx)bench-%.c: %-inputs bench-skeleton.c
+ { if [ -n "$($*-INCLUDE)" ]; then \
+ cat $($*-INCLUDE); \
+ fi; \
$(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \
- $($*-ITER) $($*-ARGLIST) $($*-RET) > $@
+ $($*-ITER) $($*-ARGLIST) $($*-RET); } > $@-tmp
+ mv -f $@-tmp $@
.PHONY: distclean realclean subdir_distclean subdir_realclean \