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

Issue 846663002: Use ThreadData::Now() for TrackingInfo::time_posted initialization (Closed)

Created:
5 years, 11 months ago by jdduke (slow)
Modified:
5 years, 11 months ago
Reviewers:
danakj, jamesr, Sami
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, sadrul, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, erikwright+watch_chromium.org, scheduler-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use ThreadData::Now() for TrackingInfo::time_posted initialization TrackingInfo::time_posted is only used for task profiling, however, it is always initialized with TimeTicks::Now(). As TimeTicks::Now() can be relatively expensive, particularly on Android, instead use ThreadData::Now(), effectively a no-op when task profiling is disabled. With task profiling disabled by default on Android, this saves ~1-2us per task, or ~40% of the fixed cost of task posting. BUG=417156, 405348 Committed: https://crrev.com/71fc9b28eff22bfe923f1ba08bbe0e62a82f7139 Cr-Commit-Position: refs/heads/master@{#310853}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Stop using time_posted in the TaskQueueManager #

Patch Set 3 : Remove unnecessary expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -33 lines) Patch
M base/message_loop/message_loop_unittest.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M base/threading/worker_pool_posix.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/threading/worker_pool_win.cc View 1 chunk +1 line, -3 lines 0 comments Download
M base/tracked_objects_unittest.cc View 9 chunks +9 lines, -18 lines 0 comments Download
M base/tracking_info.h View 1 chunk +7 lines, -4 lines 0 comments Download
M base/tracking_info.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/scheduler/task_queue_manager.cc View 1 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
jdduke (slow)
jamesr@, danakj@: PTAL. As far as I can tell, |time_posted| can safely be null when ...
5 years, 11 months ago (2015-01-09 16:40:34 UTC) #2
jdduke (slow)
+skyostil@ for content/renderer/scheduler. https://codereview.chromium.org/846663002/diff/1/content/renderer/scheduler/task_queue_manager.cc File content/renderer/scheduler/task_queue_manager.cc (right): https://codereview.chromium.org/846663002/diff/1/content/renderer/scheduler/task_queue_manager.cc#newcode235 content/renderer/scheduler/task_queue_manager.cc:235: (task.time_posted - tracked_objects::TrackedTime()).InMilliseconds()); Sami, should we ...
5 years, 11 months ago (2015-01-09 16:45:46 UTC) #4
Sami
https://codereview.chromium.org/846663002/diff/1/content/renderer/scheduler/task_queue_manager.cc File content/renderer/scheduler/task_queue_manager.cc (right): https://codereview.chromium.org/846663002/diff/1/content/renderer/scheduler/task_queue_manager.cc#newcode235 content/renderer/scheduler/task_queue_manager.cc:235: (task.time_posted - tracked_objects::TrackedTime()).InMilliseconds()); On 2015/01/09 16:45:46, jdduke wrote: > ...
5 years, 11 months ago (2015-01-09 16:48:32 UTC) #5
jdduke (slow)
https://codereview.chromium.org/846663002/diff/1/content/renderer/scheduler/task_queue_manager.cc File content/renderer/scheduler/task_queue_manager.cc (right): https://codereview.chromium.org/846663002/diff/1/content/renderer/scheduler/task_queue_manager.cc#newcode235 content/renderer/scheduler/task_queue_manager.cc:235: (task.time_posted - tracked_objects::TrackedTime()).InMilliseconds()); On 2015/01/09 16:48:32, Sami wrote: > ...
5 years, 11 months ago (2015-01-09 16:54:22 UTC) #6
danakj
LGTM % jamesr
5 years, 11 months ago (2015-01-09 17:16:22 UTC) #7
Sami
content/renderer/scheduler/task_queue_manager.cc lgtm.
5 years, 11 months ago (2015-01-09 17:17:29 UTC) #8
jamesr
lgtm nice!!
5 years, 11 months ago (2015-01-09 19:17:29 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/846663002/40001
5 years, 11 months ago (2015-01-09 19:54:23 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 11 months ago (2015-01-09 21:02:08 UTC) #12
commit-bot: I haz the power
5 years, 11 months ago (2015-01-09 21:03:00 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/71fc9b28eff22bfe923f1ba08bbe0e62a82f7139
Cr-Commit-Position: refs/heads/master@{#310853}

Powered by Google App Engine
This is Rietveld 408576698