aboutsummaryrefslogtreecommitdiff
path: root/benchtests/README
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-10-07 11:51:24 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-10-07 11:51:25 +0530
commita357259bf854478d154727bbc9e39f89c952f6cc (patch)
tree11e1d64d36fbfb9c3ed40215ac7cebfee6f6e004 /benchtests/README
parent9ec1b13d0162034464202b06d81b9daa9fe840e7 (diff)
downloadglibc-a357259bf854478d154727bbc9e39f89c952f6cc.tar
glibc-a357259bf854478d154727bbc9e39f89c952f6cc.tar.gz
glibc-a357259bf854478d154727bbc9e39f89c952f6cc.tar.bz2
glibc-a357259bf854478d154727bbc9e39f89c952f6cc.zip
Add more directives to benchmark input files
This patch adds some more directives to the benchmark inputs file, moving functionality from the Makefile and making the code generation script a bit cleaner. The function argument and return types that were earlier added as variables in the makefile and passed to the script via command line arguments are now the 'args' and 'ret' directive respectively. 'args' should be a colon separated list of argument types (skipped if the function doesn't accept any arguments) and 'ret' should be the return type. Additionally, an 'includes' directive may have a comma separated list of headers to include in the source. For example, the pow input file now looks like this: 42.0, 42.0 1.0000000000000020, 1.5 I did this to unclutter the benchtests Makefile a bit and eventually eliminate dependency of the tests on the Makefile and have tests depend on their respective include files only.
Diffstat (limited to 'benchtests/README')
-rw-r--r--benchtests/README35
1 files changed, 18 insertions, 17 deletions
diff --git a/benchtests/README b/benchtests/README
index 045b7a673d..5faca53511 100644
--- a/benchtests/README
+++ b/benchtests/README
@@ -40,23 +40,24 @@ one to add `foo' to the bench tests:
- Append the function name to the bench variable in the Makefile.
-- Define foo-ARGLIST as a colon separated list of types of the input
- arguments. Use `void' if function does not take any inputs. Put in quotes
- if the input argument is a pointer, e.g.:
-
- malloc-ARGLIST: "void *"
-
-- Define foo-RET as the type the function returns. Skip if the function
- returns void. One could even skip foo-ARGLIST if the function does not
- take any inputs AND the function returns void.
-
-- Make a file called `foo-inputs` with one input value per line, an input
- being a comma separated list of arguments to be passed into the function.
- See pow-inputs for an example.
-
- The script that parses the -inputs file treats lines beginning with a single
- `#' as comments. Lines beginning with two hashes `##' are treated specially
- as `directives'.
+- Make a file called `foo-inputs` to provide the definition and input for the
+ function. The file should have some directives telling the parser script
+ about the function and then one input per line. Directives are lines that
+ have a special meaning for the parser and they begin with two hashes '##'.
+ The following directives are recognized:
+
+ - args: This should be assigned a colon separated list of types of the input
+ arguments. This directive may be skipped if the function does not take any
+ inputs.
+ - ret: This should be assigned the type that the function returns. This
+ directive may be skipped if the function does not return a value.
+ - includes: This should be assigned a comma separated list of headers that
+ need to be included to provide declarations for the function and types it
+ may need.
+ - name: See following section for instructions on how to use this directive.
+
+ Lines beginning with a single hash '#' are treated as comments. See
+ pow-inputs for an example of an input file.
Multiple execution units per function:
=====================================