When using LIT the timing output is entirely unused but introduces a dependency on <chrono>. When libc++ is built without a montonic clock this causes some of the tests to fail.
This patch factors out all of the timing logic into support/timer.hpp and disables it by default. To enable the timing you must define LIBCXXABI_TIME_TESTS.
Details
Diff Detail
Event Timeline
These are still useful to make sure we don't regress too badly on typeinfo lookup performance, so I think we should default this to 'on'.
Then we can turn it off in the configurations where it makes for unnecessary failures (like on my baremetal stuff where there isn't a monotonic clock).
It is a bit lame that we don't have a way to automatically catch changes in the perf numbers that come out of this though. Any ideas on how to fix that?
Sounds good. I'll make the change.
It is a bit lame that we don't have a way to automatically catch changes in the perf numbers that come out of this though. Any ideas on how to fix that?
Yes. Once the suffix test patch gets through review I'm going to start working on something. I actually have an internship starting in January to solve exactly this problem.
Somewhat address @jroelofs comments. The timers are enabled by default EXCEPT when using LIT. Since there is currently no way in LIT to show the output it doesn't make sense to introduce the <chrono> dependency.
I think this include should go at the top.