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

Issue 445413003: Creating a framework for suppressing pollution of the profiler data (Closed)

Created:
6 years, 4 months ago by vadimt
Modified:
6 years, 3 months ago
CC:
chromium-reviews, piman+watch_chromium.org, erikwright+watch_chromium.org, sadrul, jam, darin-cc_chromium.org, brettw, Mark Mentovai
Visibility:
Public.

Description

Creating a framework for suppressing pollution of the profiler data and applying for know cases of pollution. See the bug. The CL introduces TaskStopwatch that has to be used to measure run time for tasks. It takes care of double-counting run time in the nested-tasks case by subtracting run time of nested tasks from their parents. TaskStopwatch can be also used for subtracting other nested intervals, such as the time while a nested message pump runs. ThreadData::TallyADeath now takes a stopwatch parameter instead of start_time and end_time. This helps avoid mistakes when the interval passed up to the parent for exclusion is different from the interval for the current task duration. BUG=401560 Committed: https://crrev.com/12f0f7db8095f1a5e40fb7227b217ddfc1724116 Cr-Commit-Position: refs/heads/master@{#294865}

Patch Set 1 #

Total comments: 14

Patch Set 2 : jar@ comments #

Patch Set 3 : Adding 1 forgotten time parameter. #

Total comments: 40

Patch Set 4 : jar@ comments #

Patch Set 5 : Clarifying terminology #

Total comments: 10

Patch Set 6 : More jar@ comments #

Total comments: 8

Patch Set 7 : (presumably) last round of jar@'s comments #

Total comments: 4

Patch Set 8 : kbr@ comments #

Patch Set 9 : Rebasing #

Patch Set 10 : Fixing a unit test. #

Patch Set 11 : Fixing unit tests again. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+507 lines, -128 lines) Patch
M base/debug/task_annotator.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -4 lines 0 comments Download
M base/profiler/scoped_profile.h View 2 chunks +2 lines, -1 line 0 comments Download
M base/profiler/scoped_profile.cc View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M base/profiler/tracked_time_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M base/run_loop.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download
M base/threading/worker_pool_posix.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M base/threading/worker_pool_win.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -4 lines 0 comments Download
M base/tracked_objects.h View 1 2 3 4 5 6 7 8 9 chunks +84 lines, -16 lines 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 6 7 12 chunks +107 lines, -33 lines 0 comments Download
M base/tracked_objects_unittest.cc View 1 2 3 4 5 6 7 8 9 10 25 chunks +273 lines, -53 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (14 generated)
vadimt
Folks, please take a look. Once you are done, I'll make sure to include remaining ...
6 years, 4 months ago (2014-08-07 19:31:54 UTC) #1
jar (doing other things)
It may be very reasonable to put some of the complexity of this change down ...
6 years, 4 months ago (2014-08-08 01:34:48 UTC) #2
vadimt
On performance. I added 4 new assignments and 1 check on Start, and 2 new ...
6 years, 4 months ago (2014-08-08 20:39:34 UTC) #3
vadimt
Just wanted to double-chek what's the current state. Is everyone happy, so I can extend ...
6 years, 4 months ago (2014-08-12 19:19:47 UTC) #4
Ilya Sherman
On 2014/08/12 19:19:47, vadimt wrote: > Just wanted to double-chek what's the current state. Is ...
6 years, 4 months ago (2014-08-12 20:12:12 UTC) #5
jar (doing other things)
This is looking pretty good... I'm always nervous about perf regressions... so we'll see how ...
6 years, 4 months ago (2014-08-26 04:09:10 UTC) #6
vadimt
https://codereview.chromium.org/445413003/diff/40001/base/threading/worker_pool_win.cc File base/threading/worker_pool_win.cc (right): https://codereview.chromium.org/445413003/diff/40001/base/threading/worker_pool_win.cc#newcode28 base/threading/worker_pool_win.cc:28: tracked_objects::TaskStopwatch stopwatch; No, but since there is method Stop, ...
6 years, 3 months ago (2014-08-26 19:15:05 UTC) #7
jar (doing other things)
I suspect we're talking at cross purposes due to names/wording. I think getting mutually agreeable ...
6 years, 3 months ago (2014-08-26 19:33:36 UTC) #8
vadimt
https://codereview.chromium.org/445413003/diff/40001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/445413003/diff/40001/base/tracked_objects.h#newcode749 base/tracked_objects.h:749: // of this stopwatch. OK. Since I believe that ...
6 years, 3 months ago (2014-08-26 19:47:46 UTC) #9
vadimt
Made upload #4 that clarifies terminology.
6 years, 3 months ago (2014-08-26 19:58:45 UTC) #10
jar (doing other things)
OK... I'm fine will wallclock and duration as wording. Thanks. I don't see usefulness of ...
6 years, 3 months ago (2014-08-27 15:25:18 UTC) #11
vadimt
Reusability is not a primary goal, but since we have Start/Stop methods, we get it ...
6 years, 3 months ago (2014-08-27 19:14:20 UTC) #12
jar (doing other things)
As I said, I'm convinced that your StopWatch class, tied tightly to the profiler, is ...
6 years, 3 months ago (2014-09-02 16:52:16 UTC) #13
vadimt
https://codereview.chromium.org/445413003/diff/80001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/445413003/diff/80001/base/threading/sequenced_worker_pool.cc#newcode760 base/threading/sequenced_worker_pool.cc:760: tracked_objects::ThreadData::NowForStartOfRun(task.birth_tally)); On 2014/09/02 16:52:16, jar (gone till 9-27-2014) wrote: ...
6 years, 3 months ago (2014-09-02 22:41:37 UTC) #14
jar (doing other things)
I still really don't like the debug-only members and methods (and would prefer test code ...
6 years, 3 months ago (2014-09-05 04:36:05 UTC) #15
vadimt
https://codereview.chromium.org/445413003/diff/100001/base/run_loop.cc File base/run_loop.cc (right): https://codereview.chromium.org/445413003/diff/100001/base/run_loop.cc#newcode50 base/run_loop.cc:50: { On 2014/09/05 04:36:05, jar (gone till 9-27-2014) wrote: ...
6 years, 3 months ago (2014-09-05 20:25:55 UTC) #16
jar (doing other things)
LGTM You'll probably need a few owner reviews, but they should be rubber stamps
6 years, 3 months ago (2014-09-06 05:09:53 UTC) #17
vadimt
brettw@chromium.org: Please provide OWNER's approval for all the files. I already got jar@'s LGTM for ...
6 years, 3 months ago (2014-09-08 14:33:00 UTC) #19
vadimt
kbr@, please provide OWNER's approval for content/browser/gpu/browser_gpu_channel_host_factory.cc mark@ please provide OWNER's approval for all other ...
6 years, 3 months ago (2014-09-10 20:25:41 UTC) #24
Mark Mentovai
I’m a little swamped right now, can you find another base OWNER?
6 years, 3 months ago (2014-09-10 20:33:25 UTC) #25
Ken Russell (switch to Gerrit)
content/browser/gpu LGTM, but I have a few comments about the new DCHECKs in TaskStopwatch. https://codereview.chromium.org/445413003/diff/120001/base/tracked_objects.cc ...
6 years, 3 months ago (2014-09-10 20:47:50 UTC) #26
vadimt
Thanks Ken! thakis@, please provide OWNER's approval for base/* files, or let me know if ...
6 years, 3 months ago (2014-09-10 20:53:38 UTC) #28
Ken Russell (switch to Gerrit)
On 2014/09/10 20:53:38, vadimt wrote: > Thanks Ken! > thakis@, please provide OWNER's approval for ...
6 years, 3 months ago (2014-09-10 21:05:17 UTC) #29
vadimt
Yeah, this was a race condition between threads of conversation :) 1. I meant “thanks ...
6 years, 3 months ago (2014-09-10 21:24:50 UTC) #30
Ken Russell (switch to Gerrit)
Thanks. LGTM again.
6 years, 3 months ago (2014-09-10 22:27:33 UTC) #31
brettw
LGTM based mostly on jar's review.
6 years, 3 months ago (2014-09-10 23:08:26 UTC) #33
vadimt
brettw@, thanks! thakis@, your review is not required anymore, but, yeah, feel free to comment. ...
6 years, 3 months ago (2014-09-10 23:11:20 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/445413003/140001
6 years, 3 months ago (2014-09-10 23:18:34 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/65311) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/54366) win_gpu ...
6 years, 3 months ago (2014-09-10 23:59:12 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/445413003/160001
6 years, 3 months ago (2014-09-12 23:12:27 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/15969)
6 years, 3 months ago (2014-09-13 01:06:12 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/445413003/180001
6 years, 3 months ago (2014-09-13 01:25:59 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/13433)
6 years, 3 months ago (2014-09-13 02:51:59 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/445413003/200001
6 years, 3 months ago (2014-09-15 17:18:15 UTC) #48
commit-bot: I haz the power
Committed patchset #11 (id:200001) as 309a5966ac9f7330db59189040215db6e9bb1a55
6 years, 3 months ago (2014-09-15 19:23:56 UTC) #49
commit-bot: I haz the power
6 years, 3 months ago (2014-09-15 19:25:23 UTC) #50
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/12f0f7db8095f1a5e40fb7227b217ddfc1724116
Cr-Commit-Position: refs/heads/master@{#294865}

Powered by Google App Engine
This is Rietveld 408576698