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

Issue 1125003002: Use CLOCK_REALTIME_COARSE when available. (Closed)

Created:
5 years, 7 months ago by bnoordhuis
Modified:
5 years, 7 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Use CLOCK_REALTIME_COARSE when available. On systems that have CLOCK_REALTIME_COARSE with good enough resolution, we can avoid making a system call to get the current time; it's serviced from the vDSO. BUG= LOG=N Committed: https://crrev.com/537ed7500c087786f28f51ff5222f1c2113776d3 Cr-Commit-Position: refs/heads/master@{#28280}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use CLOCK_REALTIME_COARSE when available, v2 #

Total comments: 1

Patch Set 3 : Use CLOCK_REALTIME_COARSE when available, v3 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M src/base/platform/time.cc View 1 2 2 chunks +38 lines, -0 lines 1 comment Download

Messages

Total messages: 27 (6 generated)
bnoordhuis
5 years, 7 months ago (2015-05-05 22:40:56 UTC) #2
Dean McNamee
Drive by... https://codereview.chromium.org/1125003002/diff/1/src/base/platform/time.cc File src/base/platform/time.cc (right): https://codereview.chromium.org/1125003002/diff/1/src/base/platform/time.cc#newcode257 src/base/platform/time.cc:257: static clockid_t clock_id = -1; I would ...
5 years, 7 months ago (2015-05-06 09:09:34 UTC) #4
Dean McNamee
On 2015/05/06 09:09:34, Dean McNamee wrote: > Drive by... > > https://codereview.chromium.org/1125003002/diff/1/src/base/platform/time.cc > File src/base/platform/time.cc ...
5 years, 7 months ago (2015-05-06 09:17:11 UTC) #5
Benedikt Meurer
https://codereview.chromium.org/1125003002/diff/1/src/base/platform/time.cc File src/base/platform/time.cc (right): https://codereview.chromium.org/1125003002/diff/1/src/base/platform/time.cc#newcode255 src/base/platform/time.cc:255: #if V8_OS_LINUX How about using #ifdef CLOCK_REALTIME_COARSE here? Amd ...
5 years, 7 months ago (2015-05-06 09:40:34 UTC) #7
bnoordhuis
On 2015/05/06 09:09:34, Dean McNamee wrote: > https://codereview.chromium.org/1125003002/diff/1/src/base/platform/time.cc#newcode261 > src/base/platform/time.cc:261: static const clockid_t kClockRealTimeCoarse = ...
5 years, 7 months ago (2015-05-06 10:44:13 UTC) #8
bnoordhuis
Added the suggested comments. I didn't explain what the vDSO is because IMO that's information ...
5 years, 7 months ago (2015-05-06 11:15:56 UTC) #9
Benedikt Meurer
https://codereview.chromium.org/1125003002/diff/20001/src/base/platform/time.cc File src/base/platform/time.cc (right): https://codereview.chromium.org/1125003002/diff/20001/src/base/platform/time.cc#newcode255 src/base/platform/time.cc:255: #if V8_OS_LINUX How about something like this instead: #if ...
5 years, 7 months ago (2015-05-06 11:25:29 UTC) #10
noordhuis
On 2015/05/06 11:25:29, Benedikt Meurer wrote: > https://codereview.chromium.org/1125003002/diff/20001/src/base/platform/time.cc > File src/base/platform/time.cc (right): > > https://codereview.chromium.org/1125003002/diff/20001/src/base/platform/time.cc#newcode255 ...
5 years, 7 months ago (2015-05-06 11:50:02 UTC) #11
Benedikt Meurer
IMHO it's better because it makes the main code not depend on V8_OS_LINUX, but on ...
5 years, 7 months ago (2015-05-06 11:52:26 UTC) #12
noordhuis
On 2015/05/06 11:52:26, Benedikt Meurer wrote: > IMHO it's better because it makes the main ...
5 years, 7 months ago (2015-05-06 13:18:04 UTC) #13
Dean McNamee
On 2015/05/06 13:18:04, noordhuis wrote: > On 2015/05/06 11:52:26, Benedikt Meurer wrote: > > IMHO ...
5 years, 7 months ago (2015-05-06 14:59:28 UTC) #14
Benedikt Meurer
Thanks Ben. LGTM
5 years, 7 months ago (2015-05-07 04:16:39 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1125003002/40001
5 years, 7 months ago (2015-05-07 04:17:11 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 7 months ago (2015-05-07 05:06:05 UTC) #18
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/537ed7500c087786f28f51ff5222f1c2113776d3 Cr-Commit-Position: refs/heads/master@{#28280}
5 years, 7 months ago (2015-05-07 05:06:16 UTC) #19
Michael Achenbach
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/1130083003/ by machenbach@chromium.org. ...
5 years, 7 months ago (2015-05-07 08:51:11 UTC) #20
yurys
Yeah, this code doesn't work well with chrome sandbox. I see the following errors in ...
5 years, 7 months ago (2015-05-07 10:17:20 UTC) #22
noordhuis
On 2015/05/07 10:17:20, yurys wrote: > Yeah, this code doesn't work well with chrome sandbox. ...
5 years, 7 months ago (2015-05-07 12:54:34 UTC) #23
yurys
On 2015/05/07 12:54:34, noordhuis wrote: > On 2015/05/07 10:17:20, yurys wrote: > > Yeah, this ...
5 years, 7 months ago (2015-05-07 13:04:13 UTC) #24
noordhuis
Figured it out, it's a new sandbox restriction. I'll file a new CL once https://codereview.chromium.org/1133653002/ ...
5 years, 7 months ago (2015-05-07 15:39:54 UTC) #25
mdempsky
5 years, 7 months ago (2015-05-07 18:47:29 UTC) #27
Message was sent while issue was closed.
https://codereview.chromium.org/1125003002/diff/40001/src/base/platform/time.cc
File src/base/platform/time.cc (right):

https://codereview.chromium.org/1125003002/diff/40001/src/base/platform/time....
src/base/platform/time.cc:262: // clockid_t is an int32_t; loads and stores are
atomic.
No, they're not.  Using atomics is atomic.

Powered by Google App Engine
This is Rietveld 408576698