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

Issue 83183005: Add synthetic delay points for latency testing (Closed)

Created:
7 years ago by Sami
Modified:
6 years, 11 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, piman+watch_chromium.org
Visibility:
Public.

Description

Add synthetic delay points for latency testing Add synthetic delay points for simulating long computation in the following parts of the graphics/input pipeline: 1. blink.HandleInputEvent - Expensive JavaScript input event handling. 2. cc.RasterRequiredForActivation - Long running raster tasks. 3. cc.BeginMainFrame - Complex main thread picture recording, layout or rAF. 4. gpu.AsyncTexImage - Slow texture uploads. 5. gpu.SwapBuffers - GPU-bound rendering. BUG=307841 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244175

Patch Set 1 #

Total comments: 5

Patch Set 2 : Avoid static initializer on raster worker pool critical path. #

Patch Set 3 : Begin delay on one thread and end it on another. #

Total comments: 1

Patch Set 4 : Unconditional reset. #

Patch Set 5 : Clarify effects of race condition. #

Total comments: 2

Patch Set 6 : Cleaner raster worker pool integration. #

Total comments: 6

Patch Set 7 : Also count number of image tasks needed for activation. #

Total comments: 7

Patch Set 8 : Address David's comments. #

Total comments: 2

Patch Set 9 : No need to loop over tasks in ImageRasterWorkerPool. #

Total comments: 2

Patch Set 10 : Fix nits. #

Patch Set 11 : Also instrument share group uploads. #

Patch Set 12 : Rebased. Fixed PerfRasterWorkerPool. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -8 lines) Patch
M cc/resources/image_raster_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/pixel_buffer_raster_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/raster_worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -1 line 0 comments Download
M cc/resources/raster_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +56 lines, -4 lines 0 comments Download
M cc/resources/raster_worker_pool_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -1 line 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/async_pixel_transfer_manager_idle.cc View 1 2 5 chunks +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
Sami
Here are the delay points I added for scheduler testing. I may need to split ...
7 years ago (2013-11-22 18:39:06 UTC) #1
nduca
https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc#newcode111 cc/resources/raster_worker_pool.cc:111: TRACE_EVENT_SYNTHETIC_DELAY_ACTIVATE("cc.RasterRequiredForActivation"); so i'm worried about how many traces we've ...
7 years ago (2013-11-24 19:45:18 UTC) #2
brianderson
https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc#newcode306 cc/resources/raster_worker_pool.cc:306: TRACE_EVENT_SYNTHETIC_DELAY_APPLY("cc.RasterRequiredForActivation"); I'm not up-to-date on the lates TileManager code. ...
7 years ago (2013-11-26 03:14:54 UTC) #3
Sami
https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc#newcode111 cc/resources/raster_worker_pool.cc:111: TRACE_EVENT_SYNTHETIC_DELAY_ACTIVATE("cc.RasterRequiredForActivation"); On 2013/11/24 19:45:18, nduca wrote: > so i'm ...
7 years ago (2013-12-02 14:57:08 UTC) #4
brianderson
https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/1/cc/resources/raster_worker_pool.cc#newcode306 cc/resources/raster_worker_pool.cc:306: TRACE_EVENT_SYNTHETIC_DELAY_APPLY("cc.RasterRequiredForActivation"); On 2013/12/02 14:57:08, Sami wrote: > On 2013/11/26 ...
7 years ago (2013-12-03 03:00:30 UTC) #5
Sami
On 2013/12/03 03:00:30, Brian Anderson wrote: > Ah ok. I see now. I'm assuming the ...
7 years ago (2013-12-03 11:47:10 UTC) #6
Sami
In a forehead-slapping moment today I realized that making it possible to start the delay ...
7 years ago (2013-12-06 21:19:01 UTC) #7
brianderson
On 2013/12/06 21:19:01, Sami wrote: > In a forehead-slapping moment today I realized that making ...
7 years ago (2013-12-10 02:25:31 UTC) #8
brianderson
https://codereview.chromium.org/83183005/diff/80001/base/debug/trace_event_synthetic_delay.cc File base/debug/trace_event_synthetic_delay.cc (right): https://codereview.chromium.org/83183005/diff/80001/base/debug/trace_event_synthetic_delay.cc#newcode90 base/debug/trace_event_synthetic_delay.cc:90: void TraceEventSyntheticDelay::BeginInternal(int begin_delta, bool reset) { When reset is ...
7 years ago (2013-12-10 02:25:39 UTC) #9
Sami
> Does any of the logic prevent that long-running task from decrementing the new > ...
7 years ago (2013-12-10 19:47:22 UTC) #10
brianderson
On 2013/12/10 19:47:22, Sami wrote: > > Does any of the logic prevent that long-running ...
7 years ago (2013-12-10 22:51:51 UTC) #11
Sami
> Interesting. I did not anticipate the difference in delays between the first and > ...
7 years ago (2013-12-11 18:10:24 UTC) #12
Sami
On 2013/12/11 18:10:24, Sami wrote: > I'll still try to think of ways to avoid ...
7 years ago (2013-12-12 18:37:45 UTC) #13
Sami
David, does this way of hooking up synthetic delays to raster_worker_pool.cc seem ok to you?
7 years ago (2013-12-12 18:39:40 UTC) #14
reveman
https://codereview.chromium.org/83183005/diff/120001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/120001/cc/resources/raster_worker_pool.cc#newcode477 cc/resources/raster_worker_pool.cc:477: "cc.RasterRequiredForActivation"); what if this is done on two threads ...
7 years ago (2013-12-12 19:29:43 UTC) #15
Sami
On 2013/12/12 19:29:43, David Reveman wrote: > https://codereview.chromium.org/83183005/diff/120001/cc/resources/raster_worker_pool.cc > File cc/resources/raster_worker_pool.cc (right): > > https://codereview.chromium.org/83183005/diff/120001/cc/resources/raster_worker_pool.cc#newcode477 ...
7 years ago (2013-12-12 19:45:09 UTC) #16
reveman
On 2013/12/12 19:45:09, Sami wrote: > On 2013/12/12 19:29:43, David Reveman wrote: > > > ...
7 years ago (2013-12-12 20:07:08 UTC) #17
Sami
On 2013/12/12 20:07:08, David Reveman wrote: > Sure but you're assuming that assigning a pointer ...
7 years ago (2013-12-12 20:17:36 UTC) #18
reveman
On 2013/12/12 20:17:36, Sami wrote: > On 2013/12/12 20:07:08, David Reveman wrote: > > Sure ...
7 years ago (2013-12-12 20:34:06 UTC) #19
Sami
Ok, last time I switch things around, I promise :) I've done away with the ...
7 years ago (2013-12-17 16:41:59 UTC) #20
reveman
https://codereview.chromium.org/83183005/diff/140001/cc/resources/image_raster_worker_pool.cc File cc/resources/image_raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/140001/cc/resources/image_raster_worker_pool.cc#newcode89 cc/resources/image_raster_worker_pool.cc:89: CreateRasterRequiredForActivationFinishedTask(0u)); why 0 here instead of the number of ...
7 years ago (2013-12-17 20:53:04 UTC) #21
brianderson
https://codereview.chromium.org/83183005/diff/140001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/140001/cc/resources/raster_worker_pool.cc#newcode323 cc/resources/raster_worker_pool.cc:323: if (tasks_pending_for_activation_) { To verify my understanding, this only ...
7 years ago (2013-12-17 21:59:15 UTC) #22
Sami
https://codereview.chromium.org/83183005/diff/140001/cc/resources/image_raster_worker_pool.cc File cc/resources/image_raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/140001/cc/resources/image_raster_worker_pool.cc#newcode89 cc/resources/image_raster_worker_pool.cc:89: CreateRasterRequiredForActivationFinishedTask(0u)); On 2013/12/17 20:53:05, David Reveman wrote: > why ...
7 years ago (2013-12-18 13:58:20 UTC) #23
reveman
https://codereview.chromium.org/83183005/diff/160001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/160001/cc/resources/raster_worker_pool.cc#newcode39 cc/resources/raster_worker_pool.cc:39: template <const char* delay_name> As this is only used ...
7 years ago (2013-12-18 20:55:17 UTC) #24
Sami
Thanks for the comments David. https://codereview.chromium.org/83183005/diff/160001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/160001/cc/resources/raster_worker_pool.cc#newcode39 cc/resources/raster_worker_pool.cc:39: template <const char* delay_name> ...
7 years ago (2013-12-19 12:49:20 UTC) #25
reveman
https://codereview.chromium.org/83183005/diff/160001/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/83183005/diff/160001/cc/resources/raster_worker_pool.cc#newcode538 cc/resources/raster_worker_pool.cc:538: bool has_tasks_required_for_activation) { On 2013/12/19 12:49:21, Sami wrote: > ...
7 years ago (2013-12-19 17:29:28 UTC) #26
Sami
On 2013/12/19 17:29:28, David Reveman wrote: > I thought some more about this and I ...
7 years ago (2013-12-19 18:21:38 UTC) #27
reveman
cc/resources lgtm with 2 minor nits should ShareGroup implementation of AsyncPixelTransferManager also be affected by ...
7 years ago (2013-12-19 19:02:23 UTC) #28
Sami
All nits addressed, thanks. Antoine, could I get your opinion on content/renderer/render_widget.cc and the changes ...
6 years, 11 months ago (2014-01-03 14:26:56 UTC) #29
piman
Not too familiar with the synthetic delay subsystem nor why it's linked to the tracing ...
6 years, 11 months ago (2014-01-08 02:31:54 UTC) #30
Sami
On 2014/01/08 02:31:54, piman (OOO back 2014-1-7) wrote: > Not too familiar with the synthetic ...
6 years, 11 months ago (2014-01-08 11:05:09 UTC) #31
nduca
lgtm if it helps
6 years, 11 months ago (2014-01-08 20:20:49 UTC) #32
nduca
(fwiw, i'd encourage reviewers to favor landing imperfectly and iterating over having this perfect... the ...
6 years, 11 months ago (2014-01-08 20:21:37 UTC) #33
reveman
On 2014/01/08 20:21:37, nduca wrote: > (fwiw, i'd encourage reviewers to favor landing imperfectly and ...
6 years, 11 months ago (2014-01-08 20:47:08 UTC) #34
reveman
Sami, I would cq+ this for you but it needs a rebase. Better if you ...
6 years, 11 months ago (2014-01-10 04:04:55 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/83183005/350001
6 years, 11 months ago (2014-01-10 11:29:06 UTC) #36
Sami
> Sami, I would cq+ this for you but it needs a rebase. Better if ...
6 years, 11 months ago (2014-01-10 11:29:24 UTC) #37
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) check_deps2git http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=212619
6 years, 11 months ago (2014-01-10 12:17:21 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/83183005/350001
6 years, 11 months ago (2014-01-10 12:18:47 UTC) #39
commit-bot: I haz the power
6 years, 11 months ago (2014-01-10 15:47:26 UTC) #40
Message was sent while issue was closed.
Change committed as 244175

Powered by Google App Engine
This is Rietveld 408576698