v8/test/unittests/base
Gabriel Charette 954146a5cf Make TimeTicks::Now() high-resolution whenever possible with low-latency.
It was already always high-resolution on POSIX but was never high
resolution on Windows. Windows does support low latency high-resolution
timers for the majority of our user base.

TimeTicks::HighResolutionNow() was only explicitly requested in testing
frameworks. As such I left the call in place but made it DCHECK that
it's running on a Windows machine on which high-resolution clocks are
used. This confirms that none of our test fleet has regressed with this
change (the previous HighResolutionNow() used to be slightly more
aggressive and also do it in a few configurations where we now fallback
to low-resolution now).

This implementation was copied as-is (modulo minor v8 API
compatibility tweaks). These implementations were the same in the
past but had diverged when, sadly, the same bug was fixed separately
years apart, in Chromium and V8:
chromium: https://codereview.chromium.org/1284053004 + https://codereview.chromium.org/2393953003
v8: https://codereview.chromium.org/1304873011

This is a prerequisite to add metrics around parallel task execution
(low-resolution clocks are useless at that level, but we also don't want
to incur high-latency clocks on machines that can't afford it cheaply).

Bug: chromium:807606
Change-Id: Id18e7be895d8431ebd0e565a1bdf358fe7838489
Reviewed-on: https://chromium-review.googlesource.com/897485
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51027}
2018-02-01 11:55:42 +00:00
..
platform Make TimeTicks::Now() high-resolution whenever possible with low-latency. 2018-02-01 11:55:42 +00:00
utils Reland "Introduce gc flag for fuzzing over compaction." 2017-11-07 15:29:30 +00:00
atomic-utils-unittest.cc [base] Add tests for base::AsAtomicWord::SetBits. 2017-08-16 15:13:02 +00:00
bits-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
cpu-unittest.cc [x86] Disable AVX unless the operating system explicitly claims to support it. 2015-01-27 09:59:24 +00:00
division-by-constant-unittest.cc Remove v8stdint.h, it doesn't serve a purpose anymore. 2014-10-21 08:25:14 +00:00
flags-unittest.cc Remove v8stdint.h, it doesn't serve a purpose anymore. 2014-10-21 08:25:14 +00:00
functional-unittest.cc Revert "MIPS[64] Implementation of MSA instructions in builtin simulator" 2017-11-17 11:02:48 +00:00
ieee754-unittest.cc [builtins] Unify most of the remaining Math builtins. 2016-07-01 11:13:02 +00:00
iterator-unittest.cc Avoid signed/unsigned warning in VC++ 2017 builds 2017-04-24 19:29:59 +00:00
logging-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
macros-unittest.cc [base] Align the address hint in VirtualMemory. 2017-07-27 13:50:06 +00:00
ostreams-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
sys-info-unittest.cc Remove NaCl support. 2016-07-27 07:50:31 +00:00
template-utils-unittest.cc Allow constexpr RegList construction from Registers 2017-10-24 17:30:11 +00:00