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

Issue 2715583002: base/process: Use /proc/self/stat to read startup time. (Closed)

Created:
3 years, 10 months ago by Daniele Castagna
Modified:
3 years, 10 months ago
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base/process: Use /proc/self/stat to read startup time. After a new renderer task is cloned, CurrentProcessInfo::CreationTime is called to compute the process startup time. CurrentProcessInfo::CreationTime tries to read this information from /proc/$PID/stat, where $PID is the current pid as self reported by the new child process. If the new task was cloned with CLONE_NEWPID, $PID will be in a different namespace than the pid namespace represented in /proc, causing CurrentProcessInfo::CreationTime to fail. This CL changes CurrentProcessInfo::CreationTime so that it now reads from /proc/self/stat instead of /proc/$PID/stat. BUG= TEST=Chrome now starts on intel cros devices even with DCHECKs enabled. Review-Url: https://codereview.chromium.org/2715583002 Cr-Commit-Position: refs/heads/master@{#452588} Committed: https://chromium.googlesource.com/chromium/src/+/4c25edcf92c0d4acccdc02f6f3a4a5264115e05c

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address jln comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -5 lines) Patch
M base/process/internal_linux.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M base/process/internal_linux.cc View 1 2 chunks +13 lines, -2 lines 0 comments Download
M base/process/process_info_linux.cc View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
Daniele Castagna
3 years, 10 months ago (2017-02-22 21:08:11 UTC) #3
jln (very slow on Chromium)
https://codereview.chromium.org/2715583002/diff/1/base/process/internal_linux.cc File base/process/internal_linux.cc (right): https://codereview.chromium.org/2715583002/diff/1/base/process/internal_linux.cc#newcode142 base/process/internal_linux.cc:142: std::vector<std::string> proc_stats; A little too much code duplication here. ...
3 years, 10 months ago (2017-02-22 22:37:15 UTC) #5
Daniele Castagna
https://codereview.chromium.org/2715583002/diff/1/base/process/internal_linux.cc File base/process/internal_linux.cc (right): https://codereview.chromium.org/2715583002/diff/1/base/process/internal_linux.cc#newcode142 base/process/internal_linux.cc:142: std::vector<std::string> proc_stats; On 2017/02/22 at 22:37:15, jln (very slow ...
3 years, 10 months ago (2017-02-23 18:04:10 UTC) #9
jln (very slow on Chromium)
lgtm
3 years, 10 months ago (2017-02-23 18:48:07 UTC) #11
Daniele Castagna
+thakis for ownership.
3 years, 10 months ago (2017-02-23 18:54:53 UTC) #13
Nico
lgtm
3 years, 10 months ago (2017-02-23 19:01:24 UTC) #14
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/2715583002/20001
3 years, 10 months ago (2017-02-23 19:28:06 UTC) #18
commit-bot: I haz the power
3 years, 10 months ago (2017-02-23 19:36:29 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/4c25edcf92c0d4acccdc02f6f3a4...

Powered by Google App Engine
This is Rietveld 408576698