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

Issue 2178733002: Task manager should support Idle Wakeups on Windows (Closed)

Created:
4 years, 5 months ago by stanisc
Modified:
4 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Task manager should support Idle Wakeups on Windows This change adds a special SharedSampler that can refresh multiple TaskManager resources for all chrome Task Groups in a single operation. On OS_WIN the implementation is based on NtQuerySystemInformation and currently provides only Idle Wakeups per second to start with. It should be fairly straightforward to support a few other resource types later, for example CPU usage and Private Memory. On non-Windows platforms SharedSampler has a trivial stub implementation that does nothing. BUG=620832 Committed: https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3 Cr-Commit-Position: refs/heads/master@{#410236}

Patch Set 1 : Finished coding #

Patch Set 2 : Added test #

Patch Set 3 : Fixed build errors #

Patch Set 4 : Use std::move and lint fixes. #

Patch Set 5 : Misc fixes #

Patch Set 6 : Fixed build error on win_clang. #

Total comments: 60

Patch Set 7 : Addressed most of CR feedback #

Patch Set 8 : Handling missing results in OnRefreshDone. #

Total comments: 40

Patch Set 9 : Resolved merge conflicts and addressed CR feedback #

Patch Set 10 : Fixed build error on win_clang #

Unified diffs Side-by-side diffs Delta from patch set Stats (+877 lines, -16 lines) Patch
A chrome/browser/task_management/sampling/shared_sampler.h View 1 2 3 4 5 6 7 8 1 chunk +144 lines, -0 lines 0 comments Download
A chrome/browser/task_management/sampling/shared_sampler_posix.cc View 1 2 3 4 5 6 7 8 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/browser/task_management/sampling/shared_sampler_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +618 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group.h View 1 2 3 4 5 6 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group.cc View 1 2 3 4 5 6 7 8 4 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group_sampler.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/task_management/sampling/task_manager_impl.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_manager_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/task_management/task_manager_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/browser/task_management/task_manager_browsertest_util.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/task_management/task_manager_browsertest_util.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/task_management/task_manager_tester.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/task_manager/task_manager_columns.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (50 generated)
stanisc
PTAL!
4 years, 4 months ago (2016-07-27 23:45:14 UTC) #26
ncarter (slow)
+scottmg: can you have a look at the SYSTEM_PROCESS_INFORMATION code in shared_sampler_win.cc ? I'm wondering ...
4 years, 4 months ago (2016-07-28 21:37:27 UTC) #32
scottmg
On 2016/07/28 21:37:27, ncarter wrote: > +scottmg: can you have a look at the SYSTEM_PROCESS_INFORMATION ...
4 years, 4 months ago (2016-07-28 22:05:55 UTC) #33
ncarter (slow)
On 2016/07/28 22:05:55, scottmg (OOO until August) wrote: > On 2016/07/28 21:37:27, ncarter wrote: > ...
4 years, 4 months ago (2016-07-28 22:28:41 UTC) #34
stanisc
Thanks for the thorough CR feedback! Some answers below. https://codereview.chromium.org/2178733002/diff/120001/chrome/browser/task_management/sampling/shared_sampler.h File chrome/browser/task_management/sampling/shared_sampler.h (right): https://codereview.chromium.org/2178733002/diff/120001/chrome/browser/task_management/sampling/shared_sampler.h#newcode28 chrome/browser/task_management/sampling/shared_sampler.h:28: ...
4 years, 4 months ago (2016-07-28 22:38:44 UTC) #35
scottmg
On 2016/07/28 22:28:41, ncarter wrote: > On 2016/07/28 22:05:55, scottmg (OOO until August) wrote: > ...
4 years, 4 months ago (2016-07-28 22:44:17 UTC) #36
scottmg
+mark as fyi since we've previously talked about whether/how to expose more of the internals ...
4 years, 4 months ago (2016-07-28 22:45:28 UTC) #38
Mark Mentovai
scottmg wrote: > +mark as fyi since we've previously talked about whether/how to expose more ...
4 years, 4 months ago (2016-07-28 23:28:34 UTC) #39
Mark Mentovai
And although I mentioned linux-syscall-support as an example, maybe that’s a terrible idea. Last week ...
4 years, 4 months ago (2016-07-28 23:32:29 UTC) #40
stanisc
I think I've addressed most issues except the duplicating NT internals data structures. I am ...
4 years, 4 months ago (2016-08-01 22:34:28 UTC) #47
brucedawson
A few comments - mostly spelling type. https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h File chrome/browser/task_management/sampling/shared_sampler.h (right): https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h#newcode27 chrome/browser/task_management/sampling/shared_sampler.h:27: // on ...
4 years, 4 months ago (2016-08-03 00:36:56 UTC) #51
stanisc
https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/ui/task_manager/task_manager_columns.cc File chrome/browser/ui/task_manager/task_manager_columns.cc (left): https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/ui/task_manager/task_manager_columns.cc#oldcode77 chrome/browser/ui/task_manager/task_manager_columns.cc:77: // and MacOS (http://crbug.com/120488). On 2016/08/03 00:36:55, brucedawson wrote: ...
4 years, 4 months ago (2016-08-03 01:39:43 UTC) #52
ncarter (slow)
this looks pretty close. https://codereview.chromium.org/2178733002/diff/120001/chrome/browser/task_management/sampling/shared_sampler.h File chrome/browser/task_management/sampling/shared_sampler.h (right): https://codereview.chromium.org/2178733002/diff/120001/chrome/browser/task_management/sampling/shared_sampler.h#newcode61 chrome/browser/task_management/sampling/shared_sampler.h:61: Callbacks(Callbacks&& other); On 2016/08/01 22:34:26, ...
4 years, 4 months ago (2016-08-03 22:28:55 UTC) #53
ncarter (slow)
https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h File chrome/browser/task_management/sampling/shared_sampler.h (right): https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h#newcode24 chrome/browser/task_management/sampling/shared_sampler.h:24: struct ProcessDataSnapshot; Can ProcessDataSnapshot move into SharedSampler? https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler_win.cc File ...
4 years, 4 months ago (2016-08-03 22:39:43 UTC) #54
stanisc
On 2016/08/03 22:39:43, ncarter wrote: > https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h#newcode24 > chrome/browser/task_management/sampling/shared_sampler.h:24: struct > ProcessDataSnapshot; > Can ProcessDataSnapshot ...
4 years, 4 months ago (2016-08-03 22:59:22 UTC) #55
stanisc
On 2016/08/03 22:39:43, ncarter wrote: > https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h#newcode24 > chrome/browser/task_management/sampling/shared_sampler.h:24: struct > ProcessDataSnapshot; > Can ProcessDataSnapshot ...
4 years, 4 months ago (2016-08-03 22:59:48 UTC) #56
stanisc
Addressed Bruce's and Nick's comments. https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h File chrome/browser/task_management/sampling/shared_sampler.h (right): https://codereview.chromium.org/2178733002/diff/160001/chrome/browser/task_management/sampling/shared_sampler.h#newcode24 chrome/browser/task_management/sampling/shared_sampler.h:24: struct ProcessDataSnapshot; On 2016/08/03 ...
4 years, 4 months ago (2016-08-04 01:36:01 UTC) #57
brucedawson
lgtm
4 years, 4 months ago (2016-08-04 03:42:24 UTC) #58
ncarter (slow)
lgtm
4 years, 4 months ago (2016-08-04 18:18:43 UTC) #60
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/2178733002/180001
4 years, 4 months ago (2016-08-04 18:19:30 UTC) #61
Avi (use Gerrit)
FYI you totally need to rebase. chrome/browser/ui/task_manager is gone.
4 years, 4 months ago (2016-08-04 18:22:17 UTC) #62
Avi (use Gerrit)
On 2016/08/04 18:22:17, Avi wrote: > FYI you totally need to rebase. chrome/browser/ui/task_manager is gone. ...
4 years, 4 months ago (2016-08-04 18:46:27 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/204334)
4 years, 4 months ago (2016-08-04 19:42:37 UTC) #65
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/2178733002/200001
4 years, 4 months ago (2016-08-06 00:46:20 UTC) #72
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 4 months ago (2016-08-06 00:54:41 UTC) #74
commit-bot: I haz the power
4 years, 4 months ago (2016-08-06 00:57:34 UTC) #76
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3
Cr-Commit-Position: refs/heads/master@{#410236}

Powered by Google App Engine
This is Rietveld 408576698