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

Issue 660411: [Mac] Implement NSObject zombies. (Closed)

Created:
10 years, 9 months ago by Scott Hess - ex-Googler
Modified:
9 years, 6 months ago
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

[Mac] Implement NSObject zombies. Apple's NSZombieEnabled setting makes it easier to catch messages to freed objects, but is mostly only useful in debugging environments. This implements a facility like NSZombieEnabled with the following additions: - The number of outstanding zombies can be configured. - Classes can opt-in to becoming zombies. - C++ destructors are correctly called on Leopard. The goal is to allow us to enable zombies in certain production builds to help debug some of the message-after-free bugs we have. BUG=35590, 24987 TEST=everything Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=47674

Patch Set 1 #

Total comments: 14

Patch Set 2 : Cleanups and address TODOs. #

Total comments: 2

Patch Set 3 : Nits, and only enable in DEBUG for now. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+442 lines, -0 lines) Patch
M chrome/browser/chrome_browser_application_mac.mm View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/objc_zombie.h View 1 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/objc_zombie.mm View 1 2 1 chunk +399 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Scott Hess - ex-Googler
I started poking at this last fall as a thought experiment. I believe that it ...
10 years, 9 months ago (2010-03-03 18:36:22 UTC) #1
Avi (use Gerrit)
Wow. Truly awesome and evil.
10 years, 9 months ago (2010-03-03 19:20:45 UTC) #2
pink (ping after 24hrs)
LGTM, but too many stray TODOs http://codereview.chromium.org/660411/diff/1/2 File chrome/browser/chrome_browser_application_mac.mm (right): http://codereview.chromium.org/660411/diff/1/2#newcode161 chrome/browser/chrome_browser_application_mac.mm:161: // Turn all ...
10 years, 9 months ago (2010-03-05 15:14:05 UTC) #3
Avi (use Gerrit)
http://codereview.chromium.org/660411/diff/1/4 File chrome/browser/cocoa/objc_zombie.mm (right): http://codereview.chromium.org/660411/diff/1/4#newcode28 chrome/browser/cocoa/objc_zombie.mm:28: - (Class)crZombieWasa; On 2010/03/05 15:14:05, pink wrote: > crZombieWasA ...
10 years, 9 months ago (2010-03-05 15:20:29 UTC) #4
pink (ping after 24hrs)
Hrm, i searched expecting to find "isa" and didn't. Bad AppKiDo. No doughnut. On Fri, ...
10 years, 9 months ago (2010-03-05 15:26:49 UTC) #5
Scott Hess - ex-Googler
OK, now that we have a devchannel, again, pushing this forward another stop. For rollout, ...
10 years, 7 months ago (2010-05-12 21:54:20 UTC) #6
Scott Hess - ex-Googler
ping?
10 years, 7 months ago (2010-05-18 19:48:19 UTC) #7
pink (ping after 24hrs)
lgtm. What kind of memory impact do we expect to see from 10k zombies? http://codereview.chromium.org/660411/diff/5001/6003 ...
10 years, 7 months ago (2010-05-18 19:56:56 UTC) #8
John Grabowski
On Tue, May 18, 2010 at 12:56 PM, <pinkerton@chromium.org> wrote: > lgtm. > > What ...
10 years, 7 months ago (2010-05-18 20:01:55 UTC) #9
pink (ping after 24hrs)
you misunderstand. These are NSZombie objects, not zombie processes. On Tue, May 18, 2010 at ...
10 years, 7 months ago (2010-05-18 20:04:11 UTC) #10
Scott Hess - ex-Googler
On 2010/05/18 19:56:56, pink wrote: > What kind of memory impact do we expect to ...
10 years, 7 months ago (2010-05-18 20:37:58 UTC) #11
John Grabowski
10 years, 7 months ago (2010-05-18 20:38:09 UTC) #12
Ah.  Less exciting then.

jrg

On Tue, May 18, 2010 at 1:04 PM, Mike Pinkerton <pinkerton@chromium.org>wrote:

> you misunderstand. These are NSZombie objects, not zombie processes.
>
> On Tue, May 18, 2010 at 4:01 PM, John Grabowski <jrg@chromium.org> wrote:
> >
> >
> > On Tue, May 18, 2010 at 12:56 PM, <pinkerton@chromium.org> wrote:
> >>
> >> lgtm.
> >>
> >> What kind of memory impact do we expect to see from 10k zombies?
> >
> >
> > 'sysctl kern.maxproc' give me 2000 on 10.5 with 12G RAM.
> > So 10k is well into "zombie apocalypse".
> > Memory impact is the least of your problems.
> > Armor your car a la Mad Max.
> > jrg
> >
> >>
> >> http://codereview.chromium.org/660411/diff/5001/6003
> >> File chrome/browser/cocoa/objc_zombie.mm (right):
> >>
> >> http://codereview.chromium.org/660411/diff/5001/6003#newcode40
> >> chrome/browser/cocoa/objc_zombie.mm:40: DestructFn
> *g_object_cxxDestruct
> >> = NULL;
> >> nit, DestructFn*, per chrome guidelines.
> >>
> >> http://codereview.chromium.org/660411/show
> >
> >
>
>
>
> --
> Mike Pinkerton
> Mac Weenie
> pinkerton@google.com
>

Powered by Google App Engine
This is Rietveld 408576698