Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 696211 - Align ChunkInfo by inserting padding in Chunk
: Align ChunkInfo by inserting padding in Chunk
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86_64 Linux
: -- major (vote)
: mozilla10
Assigned To: Terrence Cole [:terrence]
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2011-10-20 14:04 PDT by Terrence Cole [:terrence]
Modified: 2011-10-21 13:24 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (1.67 KB, patch)
2011-10-20 14:04 PDT, Terrence Cole [:terrence]
wmccloskey: review+
Details | Diff | Splinter Review
v2: With review feedback. (2.15 KB, patch)
2011-10-20 17:39 PDT, Terrence Cole [:terrence]
no flags Details | Diff | Splinter Review

Description Terrence Cole [:terrence] 2011-10-20 14:04:01 PDT
Created attachment 568509 [details] [diff] [review]

We get a 2% speedup on EarlyBoyer if ChunkInfo (hot all over the GC allocator paths) is not split across a cache line.  An easy and guaranteed effective way to do this is to just pad Chunk out to the full 1MiB allocation.  This makes ChunkInfo abut the end of the 1MiB allocation, rather than whereever the Arenas and ChunkBitmap happen to end.  Since GC Chunks are aligned at 1MiB address boundaries, this ensures that ChunkInfo is inside of a
cache line.
Comment 1 Terrence Cole [:terrence] 2011-10-20 14:27:44 PDT
Speedup under 32bit linux build (running on 64bit) is an incredibly modest 0.2%, so this appears to be isolated to 64bit builds.
Comment 2 Bill McCloskey (:billm) 2011-10-20 17:04:28 PDT
Comment on attachment 568509 [details] [diff] [review]

Nice job. Can you change the assert after the definition of Chunk to read:


(instead of <=)?
Comment 3 Terrence Cole [:terrence] 2011-10-20 17:39:03 PDT
Created attachment 568572 [details] [diff] [review]
v2: With review feedback.

Good catch!  I actually had this check my other patch but forgot about it, apparently.
Comment 5 Marco Bonardo [::mak] 2011-10-21 02:19:42 PDT

Note You need to log in before you can comment on or make changes to this bug.