Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 23691025: Adding shutdown tracing capabilities (Closed)

Created:
7 years, 3 months ago by Mr4D (OOO till 08-26)
Modified:
7 years, 3 months ago
CC:
chromium-reviews, jbauman+watch_chromium.org, sadrul, ben+watch_chromium.org, Ian Vollick, jam, sievers+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org, cc-bugs_chromium.org
Visibility:
Public.

Description

Adding shutdown tracing capabilities use "--trace-shutdown" to enable the feature to start profiling when the user has pressed "shutdown" and specify "--trace-shutdown-file=<name>" to specify the file where you want to dump to. Additionally you can specify which modules to trace with e.g. "--trace-shutdown=base,net". That said: NOTE that the dumping will cost time since it has to be done after the shutdown of Chrome is finished. As such it takes time and will make it impossible to get a correct reading of time from shutdown till a new startup is finished. Note: This is similar to the trace-startup - with the exception that upon shutdown it is not possible to rely on threads for IO anymore. BUG=281524 TEST=visual tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221631

Patch Set 1 #

Total comments: 22

Patch Set 2 : Started the profiling in AttemptUserExit instead of BrowserMainRunner::Shutdown. #

Total comments: 8

Patch Set 3 : Addressed #

Patch Set 4 : Fixing windows build problems #

Patch Set 5 : Moved the trace starting for OS'ses other then ChromeOS to a later point where is no user intervent… #

Total comments: 12

Patch Set 6 : Addressed. Most of it. #

Total comments: 4

Patch Set 7 : Addressed #

Patch Set 8 : Ha! git CL upload uploaded even nothing has changed... Addressed. #

Total comments: 20

Patch Set 9 : Addressed #

Total comments: 8

Patch Set 10 : Addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -39 lines) Patch
M ash/shell.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/browser_shutdown.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime.cc View 1 2 3 4 5 6 7 4 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_destroyer.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 6 chunks +75 lines, -29 lines 0 comments Download
M content/browser/browser_main_runner.cc View 1 2 3 4 5 6 7 8 2 chunks +22 lines, -9 lines 0 comments Download
A content/browser/browser_shutdown_profile_dumper.h View 1 2 3 4 5 6 7 8 1 chunk +69 lines, -0 lines 0 comments Download
A content/browser/browser_shutdown_profile_dumper.cc View 1 2 3 4 5 6 7 8 9 1 chunk +107 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M ui/aura/root_window.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Mr4D (OOO till 08-26)
Please have a look!
7 years, 3 months ago (2013-08-30 21:47:01 UTC) #1
DaveMoore
+nduca https://codereview.chromium.org/23691025/diff/20001/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/23691025/diff/20001/chrome/browser/lifetime/application_lifetime.cc#newcode133 chrome/browser/lifetime/application_lifetime.cc:133: base::debug::TraceLog::RECORD_UNTIL_FULL); Be sure to turn off tracing if ...
7 years, 3 months ago (2013-08-30 22:51:15 UTC) #2
James Cook
I might also mention in the commit description that this is similar to --trace-startup https://codereview.chromium.org/23691025/diff/1/content/browser/browser_main_loop.cc ...
7 years, 3 months ago (2013-08-30 22:54:02 UTC) #3
Mr4D (OOO till 08-26)
Please have another look! https://codereview.chromium.org/23691025/diff/1/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/23691025/diff/1/content/browser/browser_main_loop.cc#newcode718 content/browser/browser_main_loop.cc:718: TRACE_EVENT0("shutdown", Since that might change ...
7 years, 3 months ago (2013-08-31 02:03:44 UTC) #4
Mr4D (OOO till 08-26)
Moved the shutdown trace start to a later point when no user intervention is possible ...
7 years, 3 months ago (2013-09-03 16:46:39 UTC) #5
DaveMoore
https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc#newcode127 chrome/browser/lifetime/application_lifetime.cc:127: void AttemptUserExit() { Why can't you always start shutdown ...
7 years, 3 months ago (2013-09-03 17:02:47 UTC) #6
Mr4D (OOO till 08-26)
Addressed (most of it). Please have another look! https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc#newcode127 chrome/browser/lifetime/application_lifetime.cc:127: void ...
7 years, 3 months ago (2013-09-03 17:34:33 UTC) #7
DaveMoore
https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc#newcode127 chrome/browser/lifetime/application_lifetime.cc:127: void AttemptUserExit() { I would want that info in ...
7 years, 3 months ago (2013-09-03 20:24:10 UTC) #8
DaveMoore
On 2013/09/03 20:24:10, DaveMoore wrote: > https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc > File chrome/browser/lifetime/application_lifetime.cc (right): > > https://codereview.chromium.org/23691025/diff/61001/chrome/browser/lifetime/application_lifetime.cc#newcode127 > ...
7 years, 3 months ago (2013-09-03 21:17:39 UTC) #9
James Cook
lgtm with optional nits https://codereview.chromium.org/23691025/diff/21011/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/23691025/diff/21011/chrome/browser/lifetime/application_lifetime.cc#newcode160 chrome/browser/lifetime/application_lifetime.cc:160: void StartShutdownTracing() { optional nit: ...
7 years, 3 months ago (2013-09-03 21:23:35 UTC) #10
Mr4D (OOO till 08-26)
Addressed! @Nduca - could you please do the owners review? Thanks! https://codereview.chromium.org/23691025/diff/21011/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): ...
7 years, 3 months ago (2013-09-03 22:18:58 UTC) #11
nduca
lgtm but please have wangxianzhu lg as well for compatibility with the new thread local ...
7 years, 3 months ago (2013-09-04 23:01:30 UTC) #12
Xianzhu
lgtm. My CL changes TraceLog::Flush() to be async, so the new call site added in ...
7 years, 3 months ago (2013-09-04 23:21:11 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23691025/91001
7 years, 3 months ago (2013-09-04 23:38:19 UTC) #14
Mr4D (OOO till 08-26)
Sky, can you do please an owners review? Thanks!
7 years, 3 months ago (2013-09-04 23:48:30 UTC) #15
sky
https://codereview.chromium.org/23691025/diff/91001/content/browser/browser_main_runner.cc File content/browser/browser_main_runner.cc (right): https://codereview.chromium.org/23691025/diff/91001/content/browser/browser_main_runner.cc#newcode137 content/browser/browser_main_runner.cc:137: DCHECK(initialization_started_); I would actually keep these three above your ...
7 years, 3 months ago (2013-09-05 00:00:13 UTC) #16
Mr4D (OOO till 08-26)
Addressed! Please have another look! https://codereview.chromium.org/23691025/diff/91001/content/browser/browser_main_runner.cc File content/browser/browser_main_runner.cc (right): https://codereview.chromium.org/23691025/diff/91001/content/browser/browser_main_runner.cc#newcode137 content/browser/browser_main_runner.cc:137: DCHECK(initialization_started_); On 2013/09/05 00:00:14, ...
7 years, 3 months ago (2013-09-05 00:13:40 UTC) #17
sky
LGTM
7 years, 3 months ago (2013-09-05 15:45:13 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23691025/53001
7 years, 3 months ago (2013-09-05 15:53:36 UTC) #19
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=23957
7 years, 3 months ago (2013-09-05 16:06:17 UTC) #20
Mr4D (OOO till 08-26)
@piman - could you please do an owners review? Many thanks!
7 years, 3 months ago (2013-09-05 16:12:49 UTC) #21
piman
LGTM+nit https://codereview.chromium.org/23691025/diff/53001/content/browser/browser_shutdown_profile_dumper.cc File content/browser/browser_shutdown_profile_dumper.cc (right): https://codereview.chromium.org/23691025/diff/53001/content/browser/browser_shutdown_profile_dumper.cc#newcode20 content/browser/browser_shutdown_profile_dumper.cc:20: dump_file_(0) { nit: NULL https://codereview.chromium.org/23691025/diff/53001/content/browser/browser_shutdown_profile_dumper.cc#newcode31 content/browser/browser_shutdown_profile_dumper.cc:31: // what ...
7 years, 3 months ago (2013-09-05 17:28:39 UTC) #22
Mr4D (OOO till 08-26)
Addressed! Thanks! https://codereview.chromium.org/23691025/diff/53001/content/browser/browser_shutdown_profile_dumper.cc File content/browser/browser_shutdown_profile_dumper.cc (right): https://codereview.chromium.org/23691025/diff/53001/content/browser/browser_shutdown_profile_dumper.cc#newcode20 content/browser/browser_shutdown_profile_dumper.cc:20: dump_file_(0) { On 2013/09/05 17:28:40, piman wrote: ...
7 years, 3 months ago (2013-09-05 18:55:17 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23691025/128001
7 years, 3 months ago (2013-09-05 18:57:03 UTC) #24
commit-bot: I haz the power
7 years, 3 months ago (2013-09-06 07:47:09 UTC) #25
Message was sent while issue was closed.
Change committed as 221631

Powered by Google App Engine
This is Rietveld 408576698