Add windows performance counters
This CL is adding the system performance counters on Windows.
A way to compute the system IO activity is to sum IO counters for
every processes. On windows, the GetIoCounters(...) call returns
counters by process. Using this technique has two drawbacks
1) an expensive processes enumeration is required
2) processes may disappear during the sample slice, which
is leading to inaccurate metric.
We are proposing to call a ntdll API which returns system wide
counters. The operating system is keeping system wide counters
for IO accesses through ZwReadFile and ZwWriteFile.
see:
https://docs.microsoft.com/en-us/windows/desktop/api/winternl/nf-winternl-ntquerysysteminformation
"Returns an opaque SYSTEM_PERFORMANCE_INFORMATION structure that can be used to generate an
unpredictable seed for a random number generator. "
Layout:
https://cs.chromium.org/chromium/src/third_party/perl/c/i686-w64-mingw32/include/winternl.h?type=cs&l=609
https://processhacker.sourceforge.io/doc/struct___s_y_s_t_e_m___p_e_r_f_o_r_m_a_n_c_e___i_n_f_o_r_m_a_t_i_o_n.html
To see these metrics, you can activate "system_stats" category and grab a trace.
A sample is collected every two seconds and will be displayed in the tracing UI.
Next step is to modify catapult to convert these tracing tracks as rate instead than raw counters.
see:
catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.html
Change-Id: I45b6b04192c78dd5a0dc95eca0c2d357e74ca285
R=fdoray, gab
Bug: 872900
Change-Id: I45b6b04192c78dd5a0dc95eca0c2d357e74ca285
Reviewed-on: https://chromium-review.googlesource.com/1169871Reviewed-by:
Bruce Dawson <brucedawson@chromium.org>
Reviewed-by:
François Doray <fdoray@chromium.org>
Reviewed-by:
Gabriel Charette <gab@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583374}
Showing
Please register or sign in to comment