Ensure that the test version of the command line tool is stable for benchmarking (#2076)
Some benchmark suites contain test cases that have nonreproducible behaviour. This is mostly caused by relying on "now" when dealing with dates or timestamps, instead of using a fixed moment. (A notorious example is the crypto-aes.js test case of the sunspider bechmark suite, where the heap memory consumption can vary between 34K-41K heap because of using `(new Date()).getTime()`.) This commit renames the jerry-minimal command line tool to jerry-test (to better reflect its purpose) and adds extra code, which intercepts some calls to libc (`gettimeofday`, `rand`) and pins their results to some fixed values. This makes the tool useless in a general case but ensures stable results when benchmarking -- for which it is mostly used. As a side effect, the commit also changes jerry-libc by making all libc functions weak symbols to allow their override from application code. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
+2
-2
@@ -122,8 +122,8 @@ JERRY_BUILDOPTIONS = [
|
||||
['--jerry-libc=off', '--compile-flag=-m32', '--cpointer-32bit=on', '--system-allocator=on']),
|
||||
Options('buildoption_test-external_context',
|
||||
['--jerry-libc=off', '--external-context=on']),
|
||||
Options('buildoption_test-cmdline_minimal',
|
||||
['--jerry-cmdline-minimal=on']),
|
||||
Options('buildoption_test-cmdline_test',
|
||||
['--jerry-cmdline-test=on']),
|
||||
Options('buildoption_test-cmdline_snapshot',
|
||||
['--jerry-cmdline-snapshot=on']),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user