Task manager should support idle wakeups on Windows |
||||
Issue descriptionWhen investigating idle chrome power usage bugs such as crbug.com/620505 it is very useful to have idle wakeups as a task manager column. This would make correlating context switches to a particular Chrome process easier, and would avoid the need to use ETW or Process Explorer. This information appears to be available through NtQuerySystemInformation and the SYSTEM_THREAD_INFORMATION structures which are contained in the SYSTEM_PROCESS_INFORMATION structure. This is explained here: http://alax.info/blog/1182
,
Jul 11 2016
See also this archived Android CL: https://chromiumcodereview.appspot.com/1242943005/
,
Jul 14 2016
Is there any way to trace idle wakeups from ETW? If so, that seems like it'd be a terrific thing to sync with Chrome traces, in which case we could create a TBMv2 metric that just counts the number present in the ETW trace, and this might be another use case for synced ETW traces w/ Chrome traces. If such a thing isn't possible, then using NtQuerySystemInformation seems like a reasonable backup.
,
Jul 14 2016
ETW certainly supports recording idle wakeups. However it requires administrator access and is extremely complex. Therefore NtQuerySystemInformation is a better choice for Chrome's task manager - a few dozen lines of code does the trick.
,
Jul 14 2016
Implementing this will probably make crbug.com/618862 some combination of obsolete and fixed. That is, the old PrivateWorkingSetSnapshot class will probably go away. Note that if we have a version of SYSTEM_PROCESS_INFORMATION and SYSTEM_THREAD_INFORMATION defined for this then we should probably use custom names to avoid ODR violations - there are other definitions of SYSTEM_PROCESS_INFORMATION.
,
Jul 18 2016
,
Aug 1 2016
Once this code is used to get private working set as well then be sure to test that the PDH DLLs are not loaded by default. They should only be needed if one of the other memory columns is enabled. Loading less code is part of maintaining good performance.
,
Aug 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/71b5b48907b3a310e9006a427dda3f2ffbc08bc3 commit 71b5b48907b3a310e9006a427dda3f2ffbc08bc3 Author: stanisc <stanisc@chromium.org> Date: Sat Aug 06 00:54:24 2016 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 Review-Url: https://codereview.chromium.org/2178733002 Cr-Commit-Position: refs/heads/master@{#410236} [add] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/shared_sampler.h [add] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/shared_sampler_posix.cc [add] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/shared_sampler_win.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/task_group.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/task_group.h [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/task_group_sampler.h [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/task_manager_impl.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/sampling/task_manager_impl.h [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/task_manager_browsertest.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/task_manager_browsertest_util.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/task_manager_browsertest_util.h [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/task_management/task_manager_tester.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/browser/ui/task_manager/task_manager_columns.cc [modify] https://crrev.com/71b5b48907b3a310e9006a427dda3f2ffbc08bc3/chrome/chrome_browser.gypi
,
Aug 13 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by brucedaw...@chromium.org
, Jul 6 2016