Closed Bug 1471878 Opened 6 years ago Closed 6 years ago

Cells should use alignas to enforce size and alignment requirements

Categories

(Core :: JavaScript: GC, enhancement, P5)

61 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jonco, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

(Whiteboard: [overhead:17K])

Attachments

(1 file)

At the moment we manually pad cells like this:

https://searchfox.org/mozilla-central/source/js/src/vm/JSScript.h#1183

We should be able to give Cell an alignas specifier and have the compiler enforce this for us.
Use alignas on gc::Cell and remove manual padding.
Assignee: nobody → tcampbell
Attachment #8997022 - Flags: review?(jcoppeard)
Comment on attachment 8997022 [details] [diff] [review]
0001-Bug-1471878-Use-alignas-on-gc-Cell-instead-of-manual.patch

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

Nice!
Attachment #8997022 - Flags: review?(jcoppeard) → review+
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad5ea44b2053
Use alignas on gc::Cell instead of manual padding. r=jonco
This caused a 17K improvement on base content JS usage \o/
Whiteboard: [overhead:17K]
Wut. I didn't expect any changes. This makes me wonder what is happening..
Ah, It looks like it builds with VTUNE support and our packing of JSScript was silly before
https://hg.mozilla.org/mozilla-central/rev/ad5ea44b2053
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: