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

Issue 9936002: Added code so renderer would cleanly exit. (Closed)

Created:
8 years, 8 months ago by asharif1
Modified:
8 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, bjanakiraman1
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Added code so renderer would cleanly exit. This code is only invoked when --renderer-clean-exit is passed to Chrome. It does the following: 1. Makes the browser process not send a SIGTERM to its children. 2. Makes the renderer process not call _exit() in OnChannelError(). Why is this needed? The renderer process in Chrome does not exit cleanly currently so when Chrome is profiled for optimization we do not get representative data and miss out on optimization opportunities. This CL addresses that problem by ensuring that exit handlers including profile dumpers get run before the renderer exits. BUG=107584 TEST=Rebuilt Chrome with -fprofile-generate. Verified that the renderer process' profile is included when Chrome is closed. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=131625

Patch Set 1 #

Patch Set 2 : git try #

Total comments: 1

Patch Set 3 : Added test. #

Patch Set 4 : Fixed issue with constructor. #

Patch Set 5 : Added chrome_switches.cc to libcontent_browser.a. #

Total comments: 8

Patch Set 6 : Fixed nits. #

Total comments: 10

Patch Set 7 : Addressed comments. #

Patch Set 8 : Rebased. #

Patch Set 9 : Rebased again. #

Total comments: 4

Patch Set 10 : Fixed indentation. #

Patch Set 11 : Rebased again. #

Patch Set 12 : Added ifdef around alarm(30). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -4 lines) Patch
M chrome/test/functional/PYAUTO_TESTS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/functional/test_clean_exit.py View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 5 6 1 chunk +7 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -2 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
asharif1
Thanks to Markus' comments on my original CL: http://codereview.chromium.org/9837053/, I was able to code up ...
8 years, 8 months ago (2012-03-29 22:54:46 UTC) #1
asharif1
+agl to the reviewers like the old CL. PTAL.
8 years, 8 months ago (2012-03-29 23:14:56 UTC) #2
Markus (顧孟勤)
Overall, this changelist makes me much happier. It is far less invasive and it doesn't ...
8 years, 8 months ago (2012-03-29 23:58:36 UTC) #3
asharif1
On Thu, Mar 29, 2012 at 4:58 PM, <markus@chromium.org> wrote: > Overall, this changelist makes ...
8 years, 8 months ago (2012-03-30 00:04:56 UTC) #4
Markus (顧孟勤)
Ideally, I think, we would want a test that runs both browser and renderer and ...
8 years, 8 months ago (2012-03-30 00:28:00 UTC) #5
tony
Can you make this a command line flag rather than a compile time option? Then ...
8 years, 8 months ago (2012-03-30 00:47:29 UTC) #6
jam
On 2012/03/30 00:47:29, tony wrote: > Can you make this a command line flag rather ...
8 years, 8 months ago (2012-03-30 03:50:02 UTC) #7
asharif1
I've converted it into a command line flag. However, I don't know how to write ...
8 years, 8 months ago (2012-04-03 01:01:20 UTC) #8
asharif1
On 2012/04/03 01:01:20, asharif1 wrote: > I've converted it into a command line flag. However, ...
8 years, 8 months ago (2012-04-05 18:58:49 UTC) #9
asharif1
On 2012/04/05 18:58:49, asharif1 wrote: > On 2012/04/03 01:01:20, asharif1 wrote: > > I've converted ...
8 years, 8 months ago (2012-04-05 20:03:02 UTC) #10
asharif1
+reviewers: nirnimesh and dennisjeffrey Nirnimesh, please read the discussion above. I found found that a ...
8 years, 8 months ago (2012-04-05 23:00:29 UTC) #11
dennis_jeffrey
On 2012/04/05 23:00:29, asharif1 wrote: > +reviewers: nirnimesh and dennisjeffrey > > Nirnimesh, please read ...
8 years, 8 months ago (2012-04-06 00:15:29 UTC) #12
Nirnimesh
On 2012/04/06 00:15:29, dennis_jeffrey wrote: > On 2012/04/05 23:00:29, asharif1 wrote: > > +reviewers: nirnimesh ...
8 years, 8 months ago (2012-04-06 01:06:30 UTC) #13
Nirnimesh
http://codereview.chromium.org/9936002/diff/10001/chrome/common/chrome_switches.cc File chrome/common/chrome_switches.cc (right): http://codereview.chromium.org/9936002/diff/10001/chrome/common/chrome_switches.cc#newcode566 chrome/common/chrome_switches.cc:566: // Enables clean exit of the renderer process via ...
8 years, 8 months ago (2012-04-06 01:06:41 UTC) #14
asharif1
On 2012/04/06 01:06:41, Nirnimesh wrote: > http://codereview.chromium.org/9936002/diff/10001/chrome/common/chrome_switches.cc > File chrome/common/chrome_switches.cc (right): > > http://codereview.chromium.org/9936002/diff/10001/chrome/common/chrome_switches.cc#newcode566 > ...
8 years, 8 months ago (2012-04-06 02:28:20 UTC) #15
Nirnimesh
http://codereview.chromium.org/9936002/diff/18002/chrome/test/functional/test_clean_exit.py File chrome/test/functional/test_clean_exit.py (right): http://codereview.chromium.org/9936002/diff/18002/chrome/test/functional/test_clean_exit.py#newcode25 chrome/test/functional/test_clean_exit.py:25: return ['--no-sandbox', '--renderer-clean-exit', This method should only ever append ...
8 years, 8 months ago (2012-04-06 04:34:10 UTC) #16
Nirnimesh
Oh, and please add the test to chrome/test/functional/PYAUTO_TESTS ('linux' section) or else it won't run.
8 years, 8 months ago (2012-04-06 04:35:02 UTC) #17
asharif1
http://codereview.chromium.org/9936002/diff/18002/chrome/test/functional/test_clean_exit.py File chrome/test/functional/test_clean_exit.py (right): http://codereview.chromium.org/9936002/diff/18002/chrome/test/functional/test_clean_exit.py#newcode25 chrome/test/functional/test_clean_exit.py:25: return ['--no-sandbox', '--renderer-clean-exit', On 2012/04/06 04:34:10, Nirnimesh wrote: > ...
8 years, 8 months ago (2012-04-06 18:45:58 UTC) #18
Nirnimesh
chrome/test/functional LGMT
8 years, 8 months ago (2012-04-06 18:51:43 UTC) #19
Nirnimesh
On 2012/04/06 18:51:43, Nirnimesh wrote: > chrome/test/functional LGMT chrome/test/functional LGTM
8 years, 8 months ago (2012-04-06 18:51:59 UTC) #20
asharif1
markus, jam and evan, ping.
8 years, 8 months ago (2012-04-06 21:19:53 UTC) #21
Markus (顧孟勤)
lgtm http://codereview.chromium.org/9936002/diff/21006/chrome/common/chrome_switches.h File chrome/common/chrome_switches.h (right): http://codereview.chromium.org/9936002/diff/21006/chrome/common/chrome_switches.h#newcode165 chrome/common/chrome_switches.h:165: extern const char kEnableRendererCleanExit[]; You might want to ...
8 years, 8 months ago (2012-04-06 21:41:58 UTC) #22
jam
http://codereview.chromium.org/9936002/diff/21006/chrome/renderer/chrome_render_process_observer.cc File chrome/renderer/chrome_render_process_observer.cc (right): http://codereview.chromium.org/9936002/diff/21006/chrome/renderer/chrome_render_process_observer.cc#newcode148 chrome/renderer/chrome_render_process_observer.cc:148: class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter { I just realized ...
8 years, 8 months ago (2012-04-09 16:02:37 UTC) #23
jam
content lgtm
8 years, 8 months ago (2012-04-09 22:29:29 UTC) #24
asharif1
markus, PTAL. http://codereview.chromium.org/9936002/diff/21006/chrome/common/chrome_switches.h File chrome/common/chrome_switches.h (right): http://codereview.chromium.org/9936002/diff/21006/chrome/common/chrome_switches.h#newcode165 chrome/common/chrome_switches.h:165: extern const char kEnableRendererCleanExit[]; On 2012/04/06 21:41:59, ...
8 years, 8 months ago (2012-04-09 23:26:33 UTC) #25
Markus (顧孟勤)
http://codereview.chromium.org/9936002/diff/30003/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): http://codereview.chromium.org/9936002/diff/30003/content/public/common/content_switches.cc#newcode522 content/public/common/content_switches.cc:522: const char kRendererCleanExit[] = "renderer-clean-exit"; Maybe fix the indentation ...
8 years, 8 months ago (2012-04-09 23:45:46 UTC) #26
asharif1
http://codereview.chromium.org/9936002/diff/30003/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): http://codereview.chromium.org/9936002/diff/30003/content/public/common/content_switches.cc#newcode522 content/public/common/content_switches.cc:522: const char kRendererCleanExit[] = "renderer-clean-exit"; On 2012/04/09 23:45:46, Markus ...
8 years, 8 months ago (2012-04-10 03:07:59 UTC) #27
asharif1
On 2012/04/10 03:07:59, asharif1 wrote: > http://codereview.chromium.org/9936002/diff/30003/content/public/common/content_switches.cc > File content/public/common/content_switches.cc (right): > > http://codereview.chromium.org/9936002/diff/30003/content/public/common/content_switches.cc#newcode522 > ...
8 years, 8 months ago (2012-04-10 03:10:25 UTC) #28
Markus (顧孟勤)
lgtm OK. In that case, your code seems to be doing the right thing. Thanks ...
8 years, 8 months ago (2012-04-10 03:31:49 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asharif@chromium.org/9936002/8031
8 years, 8 months ago (2012-04-10 19:02:25 UTC) #30
commit-bot: I haz the power
8 years, 8 months ago (2012-04-10 20:37:36 UTC) #31
Change committed as 131625

Powered by Google App Engine
This is Rietveld 408576698