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

Issue 51333007: Use CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE on Linux if available. (Closed)

Created:
7 years, 1 month ago by bnoordhuis
Modified:
7 years, 1 month ago
CC:
v8-dev
Visibility:
Public.

Description

Use CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE on Linux if available. R=bmeurer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=17611

Patch Set 1 #

Total comments: 12

Patch Set 2 : linux: use CLOCK_MONOTONIC_COARSE v2 #

Total comments: 6

Patch Set 3 : linux: use CLOCK_MONOTONIC_COARSE v3 #

Patch Set 4 : linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE #

Patch Set 5 : linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE, v2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -0 lines) Patch
M src/platform/time.cc View 1 2 3 4 3 chunks +41 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
bnoordhuis
Use clock_gettime(CLOCK_MONOTONIC_COARSE) if available, saves the overhead of a system call on older and virtualized ...
7 years, 1 month ago (2013-10-30 12:32:34 UTC) #1
Benedikt Meurer
https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode292 src/platform/time.cc:292: if (clock_gettime(6 /* CLOCK_MONOTONIC_COARSE */, ts) == 0) { ...
7 years, 1 month ago (2013-10-30 12:49:15 UTC) #2
Sven Panne
DBC... https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode291 src/platform/time.cc:291: if (no_clock_monotonic_coarse == false) { http://refactoring.com/catalog/removeDoubleNegative.html :-) Furthermore, ...
7 years, 1 month ago (2013-10-30 12:54:11 UTC) #3
bnoordhuis
I suppose I should mention that if there is code in V8 that assumes that ...
7 years, 1 month ago (2013-10-30 13:38:37 UTC) #4
bnoordhuis
https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode291 src/platform/time.cc:291: if (no_clock_monotonic_coarse == false) { On 2013/10/30 12:54:11, Sven ...
7 years, 1 month ago (2013-10-30 13:38:56 UTC) #5
Benedikt Meurer
https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode305 src/platform/time.cc:305: Time Time::Now() { On 2013/10/30 13:38:56, ben2 wrote: > ...
7 years, 1 month ago (2013-10-30 13:50:04 UTC) #6
bnoordhuis
https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode305 src/platform/time.cc:305: Time Time::Now() { On 2013/10/30 13:50:04, Benedikt Meurer wrote: ...
7 years, 1 month ago (2013-10-30 14:18:40 UTC) #7
Sven Panne
https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode291 src/platform/time.cc:291: if (no_clock_monotonic_coarse == false) { On 2013/10/30 13:38:56, ben2 ...
7 years, 1 month ago (2013-10-30 14:26:49 UTC) #8
bnoordhuis
Uploaded a new patch that only touches TimeTicks::HighResolutionNow() and checks the clock resolution first.
7 years, 1 month ago (2013-10-30 22:56:35 UTC) #9
Benedikt Meurer
I'm sorry for possible confusion. I just want to make sure that we don't break ...
7 years, 1 month ago (2013-10-31 06:44:50 UTC) #10
bnoordhuis
https://codereview.chromium.org/51333007/diff/120001/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/120001/src/platform/time.cc#newcode581 src/platform/time.cc:581: static clock_t clock_id = -1; On 2013/10/31 06:44:50, Benedikt ...
7 years, 1 month ago (2013-10-31 12:22:23 UTC) #11
Benedikt Meurer
https://codereview.chromium.org/51333007/diff/120001/src/platform/time.cc File src/platform/time.cc (right): https://codereview.chromium.org/51333007/diff/120001/src/platform/time.cc#newcode581 src/platform/time.cc:581: static clock_t clock_id = -1; On 2013/10/31 12:22:24, ben2 ...
7 years, 1 month ago (2013-11-04 09:09:57 UTC) #12
bnoordhuis
linux: use CLOCK_MONOTONIC_COARSE v3
7 years, 1 month ago (2013-11-07 21:41:52 UTC) #13
bnoordhuis
Sorry for the delay. Uploaded v3 with the requested change, PTAL.
7 years, 1 month ago (2013-11-07 21:44:23 UTC) #14
bnoordhuis
linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE
7 years, 1 month ago (2013-11-07 22:20:25 UTC) #15
bnoordhuis
linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE
7 years, 1 month ago (2013-11-07 22:20:27 UTC) #16
bnoordhuis
linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE
7 years, 1 month ago (2013-11-07 22:20:27 UTC) #17
bnoordhuis
linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE
7 years, 1 month ago (2013-11-07 22:20:33 UTC) #18
bnoordhuis
linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE
7 years, 1 month ago (2013-11-07 22:21:39 UTC) #19
bnoordhuis
Uploaded another take that also updates Time::Now() (but using CLOCK_REALTIME_COARSE). Sorry for the spam, the ...
7 years, 1 month ago (2013-11-07 22:24:47 UTC) #20
Benedikt Meurer
On 2013/11/07 22:24:47, ben2 wrote: > Uploaded another take that also updates Time::Now() (but using ...
7 years, 1 month ago (2013-11-08 06:12:18 UTC) #21
bnoordhuis
On 2013/11/08 06:12:18, Benedikt Meurer wrote: > On 2013/11/07 22:24:47, ben2 wrote: > > Uploaded ...
7 years, 1 month ago (2013-11-10 14:53:16 UTC) #22
Benedikt Meurer
LGTM
7 years, 1 month ago (2013-11-11 07:48:27 UTC) #23
Benedikt Meurer
Committed patchset #4 manually as r17611 (presubmit successful).
7 years, 1 month ago (2013-11-11 07:49:24 UTC) #24
Benedikt Meurer
On 2013/11/11 07:49:24, Benedikt Meurer wrote: > Committed patchset #4 manually as r17611 (presubmit successful). ...
7 years, 1 month ago (2013-11-11 08:49:32 UTC) #25
bnoordhuis
linux: use CLOCK_{REALTIME,MONOTONIC}_COARSE, v2
7 years, 1 month ago (2013-11-11 13:15:38 UTC) #26
bnoordhuis
Uploaded a new patch that excludes Android. I could rewrite the checks to `#if defined(CLOCK_REALTIME_COARSE)` ...
7 years, 1 month ago (2013-11-11 13:18:51 UTC) #27
Benedikt Meurer
7 years, 1 month ago (2013-11-11 13:45:49 UTC) #28
Message was sent while issue was closed.
On 2013/11/11 13:18:51, bnoordhuis wrote:
> Uploaded a new patch that excludes Android.
> 
> I could rewrite the checks to `#if defined(CLOCK_REALTIME_COARSE)` and `#if
> defined(CLOCK_MONOTONIC_COARSE)` so Android gets them for free if/when it adds
> clock_getres/clock_gettime support.

Please upload as new CL, thanks.

Powered by Google App Engine
This is Rietveld 408576698