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

Issue 2891583002: Fuchsia port of base/time, with some refactoring of POSIX time modules. (Closed)

Created:
3 years, 7 months ago by miu
Modified:
3 years, 7 months ago
Reviewers:
Lei Zhang, dsinclair, pasko
CC:
chromium-reviews, vmpstr+watch_chromium.org, wfh+watch_chromium.org, jam, darin-cc_chromium.org, mac-reviews_chromium.org, tracing+reviews_chromium.org, danakj+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fuchsia port of base/time, with some refactoring of POSIX time modules. Uses Magenta's mx_time_get() system call to implement base::Time::Now(), base::TimeTicks::Now(), and base::ThreadTicks::Now(). All other time implementation uses the POSIX-compatible API. As part of this change, it became necessary to do a little clean-up and fork time_posix.cc into three separate files: time_conversion_posix.cc, time_exploded_posix.cc, and time_now_posix.cc. The code in these files was not modified, sans some #ifdef's that were no longer necessary (and some `git cl format` indentation changes). Then, the BUILD file includes only the needed implementation files for each platform: 1. Fuchsia: time_fuchsia.cc, time_conversion_posix.cc and time_exploded_posix.cc. 2. Mac/IOS: time_mac.cc and time_conversion_posix.cc. 3. All other POSIX platforms (such as CrOS, Android, and Linux): The three time_*_posix.cc files. Testing notes: Since base_unittests doesn't compile yet, I could only confirm that the base/time/* code changes compile on Fuchsia. That said, base_unittests compiles and runs successfully on all other platforms. BUG=706592 Review-Url: https://codereview.chromium.org/2891583002 Cr-Commit-Position: refs/heads/master@{#473032} Committed: https://chromium.googlesource.com/chromium/src/+/eb6e744f08cc8087eb7836753d98d599c28a80f7

Patch Set 1 #

Total comments: 18

Patch Set 2 : Fix Mac Time::Explode() error, CHECK(clock_gettime()), comment in prefetch_predictor_tool.py. #

Patch Set 3 : Use helper function to convert mx_time_t to microsecond time in time_fuchsia.cc. #

Patch Set 4 : REBASE before commit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -711 lines) Patch
M base/BUILD.gn View 4 chunks +21 lines, -3 lines 0 comments Download
M base/time/time.h View 5 chunks +23 lines, -14 lines 0 comments Download
A base/time/time_conversion_posix.cc View 1 chunk +67 lines, -0 lines 0 comments Download
A + base/time/time_exploded_posix.cc View 9 chunks +20 lines, -189 lines 0 comments Download
A base/time/time_fuchsia.cc View 1 2 1 chunk +77 lines, -0 lines 0 comments Download
M base/time/time_mac.cc View 1 5 chunks +7 lines, -25 lines 0 comments Download
A base/time/time_now_posix.cc View 1 1 chunk +116 lines, -0 lines 0 comments Download
D base/time/time_posix.cc View 1 chunk +0 lines, -471 lines 0 comments Download
M base/time/time_win.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/tracing/tracing_controller_impl.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/resource_prefetch_predictor/prefetch_predictor_tool.py View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 33 (20 generated)
miu
thestig: PTAL at base/*. dsinclair: Please RS content/browser/tracing/*. pasko: Please RS tools/resource_prefetch_predictor/*.
3 years, 7 months ago (2017-05-17 01:44:28 UTC) #11
Lei Zhang
Exciting! https://codereview.chromium.org/2891583002/diff/40001/base/BUILD.gn File base/BUILD.gn (left): https://codereview.chromium.org/2891583002/diff/40001/base/BUILD.gn#oldcode927 base/BUILD.gn:927: "time/time_mac.cc", This has the advantage of the files ...
3 years, 7 months ago (2017-05-17 08:34:17 UTC) #14
pasko
On 2017/05/17 01:44:28, miu wrote: > thestig: PTAL at base/*. > > dsinclair: Please RS ...
3 years, 7 months ago (2017-05-17 09:12:18 UTC) #15
Lei Zhang
On 2017/05/17 09:12:18, pasko wrote: > On 2017/05/17 01:44:28, miu wrote: > > thestig: PTAL ...
3 years, 7 months ago (2017-05-17 09:19:53 UTC) #16
pasko
On 2017/05/17 09:19:53, Lei Zhang wrote: > On 2017/05/17 09:12:18, pasko wrote: > > On ...
3 years, 7 months ago (2017-05-17 13:22:49 UTC) #17
dsinclair
lgtm content/browser/tracing LGTM.
3 years, 7 months ago (2017-05-17 13:29:53 UTC) #18
pasko
https://codereview.chromium.org/2891583002/diff/40001/tools/resource_prefetch_predictor/prefetch_predictor_tool.py File tools/resource_prefetch_predictor/prefetch_predictor_tool.py (right): https://codereview.chromium.org/2891583002/diff/40001/tools/resource_prefetch_predictor/prefetch_predictor_tool.py#newcode87 tools/resource_prefetch_predictor/prefetch_predictor_tool.py:87: # For the offset, see kTimeTToMicrosecondsOffset in base/time/time_posix.cc. On ...
3 years, 7 months ago (2017-05-17 13:34:25 UTC) #19
miu
thestig/pasko: Addressed your comments. PTAL. https://codereview.chromium.org/2891583002/diff/40001/base/BUILD.gn File base/BUILD.gn (left): https://codereview.chromium.org/2891583002/diff/40001/base/BUILD.gn#oldcode927 base/BUILD.gn:927: "time/time_mac.cc", On 2017/05/17 08:34:16, ...
3 years, 7 months ago (2017-05-18 02:52:38 UTC) #22
pasko
tools/resource_prefetch_predictor lgtm
3 years, 7 months ago (2017-05-18 11:17:59 UTC) #25
Lei Zhang
lgtm https://codereview.chromium.org/2891583002/diff/40001/base/BUILD.gn File base/BUILD.gn (left): https://codereview.chromium.org/2891583002/diff/40001/base/BUILD.gn#oldcode927 base/BUILD.gn:927: "time/time_mac.cc", On 2017/05/18 02:52:38, miu wrote: > On ...
3 years, 7 months ago (2017-05-18 19:06:13 UTC) #26
miu
Thanks everyone. All set to commit. https://codereview.chromium.org/2891583002/diff/40001/base/time/time_fuchsia.cc File base/time/time_fuchsia.cc (right): https://codereview.chromium.org/2891583002/diff/40001/base/time/time_fuchsia.cc#newcode17 base/time/time_fuchsia.cc:17: const mx_time_t usec_since_unix_epoch ...
3 years, 7 months ago (2017-05-18 20:39:04 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2891583002/100001
3 years, 7 months ago (2017-05-18 20:41:34 UTC) #30
commit-bot: I haz the power
3 years, 7 months ago (2017-05-19 02:10:30 UTC) #33
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/eb6e744f08cc8087eb7836753d98...

Powered by Google App Engine
This is Rietveld 408576698