Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 23490015: Reland^2 "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class." (Closed)

Created:
7 years, 3 months ago by Benedikt Meurer
Modified:
7 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Reland^2 "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class." These classes are meant to replace OS::Ticks() and OS::TimeCurrentMillis(), which are broken in several ways. The ElapsedTimer class implements a stopwatch using TimeTicks::HighResNow() for high resolution, monotonic timing. Also fix the CpuProfile::GetStartTime() and CpuProfile::GetEndTime() methods to actually return the time relative to the unix epoch as stated in the documentation (previously that was relative to some arbitrary point in time, i.e. boot time). The previous Windows issues have been resolved, and we now use GetTickCount64() on Windows Vista and later, falling back to timeGetTime() with rollover protection for earlier Windows versions. BUG=v8:2853 R=machenbach@chromium.org, yurys@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16413

Patch Set 1 #

Patch Set 2 : Some windows cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1313 lines, -260 lines) Patch
M src/api.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/compiler.h View 4 chunks +12 lines, -13 lines 0 comments Download
M src/compiler.cc View 5 chunks +8 lines, -11 lines 0 comments Download
M src/counters.h View 2 chunks +3 lines, -6 lines 0 comments Download
M src/counters.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M src/cpu-profiler.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/cpu-profiler.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/deoptimizer.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M src/hydrogen.h View 1 chunk +11 lines, -15 lines 0 comments Download
M src/hydrogen.cc View 3 chunks +18 lines, -18 lines 0 comments Download
M src/lithium-allocator.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/log.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/log.cc View 5 chunks +5 lines, -6 lines 0 comments Download
M src/optimizing-compiler-thread.h View 3 chunks +4 lines, -5 lines 0 comments Download
M src/optimizing-compiler-thread.cc View 4 chunks +7 lines, -9 lines 0 comments Download
M src/parser.cc View 4 chunks +12 lines, -6 lines 0 comments Download
M src/platform.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/platform-linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform-macos.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform-openbsd.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform-posix.cc View 1 chunk +1 line, -13 lines 0 comments Download
M src/platform-win32.cc View 12 chunks +21 lines, -106 lines 0 comments Download
A src/platform/elapsed-timer.h View 1 chunk +120 lines, -0 lines 0 comments Download
A src/platform/time.h View 1 chunk +381 lines, -0 lines 0 comments Download
A src/platform/time.cc View 1 1 chunk +528 lines, -0 lines 0 comments Download
M src/profile-generator.h View 2 chunks +5 lines, -4 lines 0 comments Download
M src/profile-generator.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/win32-headers.h View 4 chunks +5 lines, -2 lines 0 comments Download
M src/win32-math.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M test/cctest/cctest.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 5 chunks +9 lines, -11 lines 0 comments Download
A test/cctest/test-time.cc View 1 chunk +116 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 7 chunks +20 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Benedikt Meurer
PTAL
7 years, 3 months ago (2013-08-29 08:54:01 UTC) #1
Michael Achenbach
On 2013/08/29 08:54:01, Benedikt Meurer wrote: > PTAL lgtm
7 years, 3 months ago (2013-08-29 09:08:15 UTC) #2
yurys
LGTM, we should probably update RolloverProtectedNow in base/time in Chromium to also use GetTickCount64 when ...
7 years, 3 months ago (2013-08-29 09:11:41 UTC) #3
Benedikt Meurer
Committed patchset #2 manually as r16413.
7 years, 3 months ago (2013-08-29 09:15:42 UTC) #4
Benedikt Meurer
7 years, 3 months ago (2013-08-29 09:18:20 UTC) #5
Message was sent while issue was closed.
On 2013/08/29 09:11:41, Yury Semikhatsky wrote:
> we should probably update RolloverProtectedNow in base/time in Chromium to
also
> use GetTickCount64 when it is available.

Feel free to copy to Chromium, once we are sure that it's working in V8 now. :-)

Powered by Google App Engine
This is Rietveld 408576698