From: Siddhesh Poyarekar Date: Thu, 21 Mar 2013 11:05:48 +0000 (+0530) Subject: Allow adding of arbitrary code to benchmark tests X-Git-Tag: glibc-2.18~483 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3775a8bc2d2e0c29c8a7e673f5f42537ced2b3c7;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 858b9fa2de6..3ffaa38b5ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-03-21 Siddhesh Poyarekar + + * Rules ($(objpfx)bench-%.c): Include code from a C source + file. + 2013-03-21 Joseph Myers [BZ #15287] diff --git a/Rules b/Rules index bc5dacd2f6f..02cdb4ac780 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 \