mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
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.
This commit is contained in:
parent
0a1b2ae6f6
commit
3775a8bc2d
@ -1,3 +1,8 @@
|
||||
2013-03-21 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
|
||||
* Rules ($(objpfx)bench-%.c): Include code from a C source
|
||||
file.
|
||||
|
||||
2013-03-21 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #15287]
|
||||
|
6
Rules
6
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 \
|
||||
|
Loading…
Reference in New Issue
Block a user