This patch adds microbenchmarks for the XRay Profiling Mode
implementation to the test-suite.
The benchmarks included cover:
- Cost of the Profiling Mode runtime handler(s) and underlying implementation details when enabled.
- Different benchmarks for different call stack traces. Initially showing deep, shallow, and wide function call stacks.
These microbenchmarks can be used to measure progress on the
optimisation work associated with the profiling mode runtime
implementation going forward. It also allows us to better qualify the
cost of the XRay runtime framework (in particular the trampolines) as we
make improvements to those in the future.
Depends on D48653.
I think there needs to be a llvm_test_run() for each test executable. Otherwise lit fails like this:
UNRESOLVED: test-suite :: MicroBenchmarks/XRay/ProfilingMode/shallow-call-bench.test (341 of 912) ******************** TEST 'test-suite :: MicroBenchmarks/XRay/ProfilingMode/shallow-call-bench.test' FAILED ******************** Exception during script execution: Traceback (most recent call last): File "/work/llvm-release-test/branches_release_70/sandbox/local/lib/python2.7/site-packages/lit-0.7.0.dev0-py2.7.egg/lit/run.py", line 202, in _execute_test_impl result = test.config.test_format.execute(test, lit_config) File "/work/llvm-release-test/branches_release_70/test-suite.src/litsupport/test.py", line 49, in execute litsupport.testfile.parse(context, test.getSourcePath()) File "/work/llvm-release-test/branches_release_70/test-suite.src/litsupport/testfile.py", line 50, in parse raise ValueError("Test has no RUN: line!") ValueError: Test has no RUN: line! ******************** Testing: 0 .. 10.. 20.. 30. UNRESOLVED: test-suite :: MicroBenchmarks/XRay/ProfilingMode/wide-call-bench.test (343 of 912) ******************** TEST 'test-suite :: MicroBenchmarks/XRay/ProfilingMode/wide-call-bench.test' FAILED ******************** Exception during script execution: Traceback (most recent call last): File "/work/llvm-release-test/branches_release_70/sandbox/local/lib/python2.7/site-packages/lit-0.7.0.dev0-py2.7.egg/lit/run.py", line 202, in _execute_test_impl result = test.config.test_format.execute(test, lit_config) File "/work/llvm-release-test/branches_release_70/test-suite.src/litsupport/test.py", line 49, in execute litsupport.testfile.parse(context, test.getSourcePath()) File "/work/llvm-release-test/branches_release_70/test-suite.src/litsupport/testfile.py", line 50, in parse raise ValueError("Test has no RUN: line!") ValueError: Test has no RUN: line!This worked for me:
However, the tests are flaky when run together, see below.