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

Issue 2859763002: Use another file and field for wakeups count (Closed)

Created:
3 years, 7 months ago by sabbakumov
Modified:
3 years, 7 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use another file and field for wakeups count On some Linux systems (like Ubuntu 14.04.5 or Ubuntu 16.04) with 4.8.0-49-generic kernel there's no /proc/<pid>/sched file. Or it exists but doesn't have the required se.statistics.nr_wakeups field. This causes TaskManagerBrowserTest.IdleWakeups test to fail and in Chrome Task Manager all the Idle Wakeups counts are 0. After some research I found out that the voluntary_ctxt_switches field in file /proc/<pid>/status is practically the same as the previous one. Using that field helps the test to pass. BUG=717863 Review-Url: https://codereview.chromium.org/2859763002 Cr-Commit-Position: refs/heads/master@{#469270} Committed: https://chromium.googlesource.com/chromium/src/+/93c0968c8188befdaeaf1d49a98ad9086fa4a0f3

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix name formatting issues #

Total comments: 2

Patch Set 3 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -16 lines) Patch
M base/process/process_metrics_linux.cc View 1 2 3 chunks +17 lines, -16 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
sabbakumov
3 years, 7 months ago (2017-05-03 02:56:32 UTC) #3
Mark Mentovai
thestig wrote this code and is also a base OWNER, so I’m adding him. https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc ...
3 years, 7 months ago (2017-05-03 03:17:18 UTC) #9
sabbakumov
https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc File base/process/process_metrics_linux.cc (right): https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc#newcode102 base/process/process_metrics_linux.cc:102: std::string stat_data; On 2017/05/03 03:17:17, Mark Mentovai wrote: > ...
3 years, 7 months ago (2017-05-03 03:21:02 UTC) #10
Mark Mentovai
sabbakumov wrote: > https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc > File base/process/process_metrics_linux.cc (right): > > https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc#newcode102 > base/process/process_metrics_linux.cc:102: std::string stat_data; ...
3 years, 7 months ago (2017-05-03 03:30:12 UTC) #11
Mark Mentovai
On 2017/05/03 03:17:18, Mark Mentovai wrote: > thestig wrote this code and is also a ...
3 years, 7 months ago (2017-05-03 03:31:56 UTC) #12
sabbakumov
On 2017/05/03 03:31:56, Mark Mentovai wrote: > On 2017/05/03 03:17:18, Mark Mentovai wrote: > > ...
3 years, 7 months ago (2017-05-03 05:19:48 UTC) #13
sabbakumov
https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc File base/process/process_metrics_linux.cc (right): https://codereview.chromium.org/2859763002/diff/1/base/process/process_metrics_linux.cc#newcode102 base/process/process_metrics_linux.cc:102: std::string stat_data; On 2017/05/03 03:17:17, Mark Mentovai wrote: > ...
3 years, 7 months ago (2017-05-03 05:20:05 UTC) #14
Lei Zhang
I only took a quick look, and I have some questions below. I can take ...
3 years, 7 months ago (2017-05-03 05:47:03 UTC) #15
sabbakumov
On 2017/05/03 05:47:03, Lei Zhang wrote: > I only took a quick look, and I ...
3 years, 7 months ago (2017-05-03 06:01:07 UTC) #17
Lei Zhang
On 2017/05/03 06:01:07, sabbakumov wrote: > 2) Yes, this is the Ubuntu stock kernel. You ...
3 years, 7 months ago (2017-05-03 06:11:18 UTC) #18
Mark Mentovai
I misread this the old code last night and thought that we were using se.statistics.nr_wakeups.idle. ...
3 years, 7 months ago (2017-05-03 16:41:50 UTC) #19
Mark Mentovai
Here’s what happened to se.statistics.nr_wakeups effective in Linux 4.6: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cb2517653fccaf9f9b4ae968c7ee005c1bbacdc5
3 years, 7 months ago (2017-05-03 19:44:07 UTC) #20
Lei Zhang
lgtm Thanks Mark for looking up the kernel change. https://codereview.chromium.org/2859763002/diff/20001/base/process/process_metrics_linux.cc File base/process/process_metrics_linux.cc (right): https://codereview.chromium.org/2859763002/diff/20001/base/process/process_metrics_linux.cc#newcode96 base/process/process_metrics_linux.cc:96: ...
3 years, 7 months ago (2017-05-03 21:05:26 UTC) #21
sabbakumov
https://codereview.chromium.org/2859763002/diff/20001/base/process/process_metrics_linux.cc File base/process/process_metrics_linux.cc (right): https://codereview.chromium.org/2859763002/diff/20001/base/process/process_metrics_linux.cc#newcode96 base/process/process_metrics_linux.cc:96: // Read /proc/<pid>/status and look for |field|. On succes, ...
3 years, 7 months ago (2017-05-04 04:10:52 UTC) #22
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/2859763002/40001
3 years, 7 months ago (2017-05-04 04:11:42 UTC) #25
commit-bot: I haz the power
3 years, 7 months ago (2017-05-04 05:11:50 UTC) #28
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/93c0968c8188befdaeaf1d49a98a...

Powered by Google App Engine
This is Rietveld 408576698