Closed Bug 915482 Opened 10 years ago Closed 10 years ago

Gut gc/Barrier-inl.h

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

(Whiteboard: [js:t])

Attachments

(4 files)

I have three patches that, when applied, leave gc/Barrier-inl.h with a mere three methods and 41 lines of code.
If you, as I was, are worried about the performance of EncapsulatedId::pre()
now that it contains a call -- via ShadowZoneOfObject() -- to the uninlined
ZoneOfObject(), fear not:  Cachegrind tells me that this patch makes us
execute 1.00003x *fewer* instructions on SunSpider.  Perhaps it's because
~EncapsulatedId() is now inlined when previously it wasn't.
Attachment #803445 - Flags: review?(terrence)
Comment on attachment 803445 [details] [diff] [review]
(part 1) - Move most of gc/Barrier-inl.h into gc/Barrier.h.

Review of attachment 803445 [details] [diff] [review]:
-----------------------------------------------------------------

Nice. r=me
Attachment #803445 - Flags: review?(terrence) → review+
Comment on attachment 803450 [details] [diff] [review]
(part 2) - Minimize gc/Barrier-inl.h includes.

Review of attachment 803450 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #803450 - Flags: review?(terrence) → review+
Comment on attachment 803451 [details] [diff] [review]
(part 3) - Move some functions out of vm/Shape-inl.h, jsfuninlines.h and jsinferinlines.h.

Review of attachment 803451 [details] [diff] [review]:
-----------------------------------------------------------------

r=me

::: js/src/vm/Shape.h
@@ +979,5 @@
>                                  Shape ***pspp, bool adding = false);
>      static inline Shape *searchNoHashify(Shape *start, jsid id);
>  
> +#ifdef DEBUG
> +    bool preconditionForRemoveFromDictionary(ObjectImpl *obj);

Frankly, I'd be shocked -- and more than a little appalled -- if having dictionary mode shape management inlined is critical to our performance. I think you should just out-of-line all of the dictionary-mode shape management.
Attachment #803451 - Flags: review?(terrence) → review+
Comment on attachment 803452 [details] [diff] [review]
(part 4) - Minimize vm/Shape-inl.h includes.

Review of attachment 803452 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #803452 - Flags: review?(terrence) → review+
Part 2:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e621399eb90f
Whiteboard: [js:t] → [js:t][leave open]
Part 4:
https://hg.mozilla.org/integration/mozilla-inbound/rev/47e05e8df03b
Whiteboard: [js:t][leave open] → [js:t]
https://hg.mozilla.org/mozilla-central/rev/ffe6e70b0183
https://hg.mozilla.org/mozilla-central/rev/47e05e8df03b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Depends on: 916531
No longer depends on: 916531
You need to log in before you can comment on or make changes to this bug.