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

Issue 2605004: [Mac] Tighten up objc zombie dealloc implementation. (Closed)

Created:
10 years, 6 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
Base URL:
git://codf21.jail/chromium.git
Visibility:
Public.

Description

[Mac] Tighten up objc zombie dealloc implementation. Enabling the zombie code in release causes Perf(2) to regress. Reviewing |ZombieDealloc()|, I notice that object_setClass() is implemented with a memory barrier. The objc runtime doesn't use it in deallocation, so move to direct access. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48857

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -3 lines) Patch
M chrome/browser/cocoa/objc_zombie.mm View 1 chunk +8 lines, -3 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Scott Hess - ex-Googler
10 years, 6 months ago (2010-06-03 19:10:17 UTC) #1
Avi (use Gerrit)
LG http://codereview.chromium.org/2605004/diff/1/2 File chrome/browser/cocoa/objc_zombie.mm (right): http://codereview.chromium.org/2605004/diff/1/2#newcode157 chrome/browser/cocoa/objc_zombie.mm:157: self->isa = g_zombieClass; Huh. isa is still public ...
10 years, 6 months ago (2010-06-03 19:16:51 UTC) #2
Scott Hess - ex-Googler
Is this a "check-in then make sure on 64-bit", or "make sure on 64-bit then ...
10 years, 6 months ago (2010-06-03 19:46:32 UTC) #3
Avi (use Gerrit)
10 years, 6 months ago (2010-06-03 19:49:31 UTC) #4
This was a "this works on the new runtime!?" comment. If this is not
expected to work on 64 anyway, then it has my OK.

Avi

On Thu, Jun 3, 2010 at 3:46 PM, <shess@chromium.org> wrote:

> Is this a "check-in then make sure on 64-bit", or "make sure on 64-bit then
> check-in"?  Thanks.
>
>
>
> http://codereview.chromium.org/2605004/diff/1/2
> File chrome/browser/cocoa/objc_zombie.mm (right):
>
> http://codereview.chromium.org/2605004/diff/1/2#newcode157
> chrome/browser/cocoa/objc_zombie.mm:157: self->isa = g_zombieClass;
> On 2010/06/03 19:16:51, Avi wrote:
>
>> Huh. isa is still public in the objc2 runtime? If this compiles on 64,
>>
> go for
>
>> it. If not you might have to ifdef __LP64__ it.
>>
>
> Not sure what you mean.  struct objc_class has OBJC2_UNAVAILABLE
> annotations, but struct objc_object just has Class isa with no
> annotations.
>
> This code should never be called in 64-bit due to the nlist stuff not
> being adapted yet.  I'm trying to figure out how to compile 64-bit, but:
>   GYP_DEFINES="target_arch=x64" gclient sync
> doesn't seem to change from i386.
>
>
> http://codereview.chromium.org/2605004/show
>

Powered by Google App Engine
This is Rietveld 408576698