Instead of letting the OS spread our Regions all over the place, we should allocate them all within some range of each other. This change will open the door to some other optimizations, e.g. doing simple range checks for our write barriers and compressing JSCell pointers to 32-bits. We can do this by having a SuperRegion for each BlockAllocator (i.e. per-VM) which subclasses MetaAllocator along the lines of the FixedVMPoolExecutableAllocator we use for the JIT.
Created attachment 195921 [details] Patch
(In reply to comment #1) > Created an attachment (id=195921) [details] > Patch This patch is actually a slight speedup on some benchmarks.
Created attachment 195922 [details] Patch
(In reply to comment #3) > Created an attachment (id=195922) [details] > Patch Had to add more ifdefs.
Comment on attachment 195922 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195922&action=review Other than the one comment, looks good! > Source/WTF/wtf/MetaAllocator.h:67 > + WTF_EXPORT_PRIVATE MetaAllocator(size_t allocationGranule, size_t pageSize = 0); Why not say pageSize = WTF::pageSize() and then get rid of the pageSize initialization conditional inside MetaAllocator::MetaAllocator?
(In reply to comment #5) > (From update of attachment 195922 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=195922&action=review > > Other than the one comment, looks good! > > > Source/WTF/wtf/MetaAllocator.h:67 > > + WTF_EXPORT_PRIVATE MetaAllocator(size_t allocationGranule, size_t pageSize = 0); > > Why not say pageSize = WTF::pageSize() and then get rid of the pageSize initialization conditional inside MetaAllocator::MetaAllocator? Good call.
Comment on attachment 195922 [details] Patch Attachment 195922 [details] did not pass efl-ews (efl): Output: http://webkit-commit-queue.appspot.com/results/17392062
Committed r147324: <http://trac.webkit.org/changeset/147324>
So much build carnage... http://trac.webkit.org/changeset/147328 http://trac.webkit.org/changeset/147329 http://trac.webkit.org/changeset/147330 http://trac.webkit.org/changeset/147332 http://trac.webkit.org/changeset/147334 http://trac.webkit.org/changeset/147335
Comment on attachment 195922 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195922&action=review > Source/JavaScriptCore/heap/SuperRegion.cpp:34 > +const size_t SuperRegion::s_fixedHeapMemoryPoolSize = 4 * 1024 * MB; This seems a bit excessive, compared to most heaps. If the only cost of going over is a bit of performance, maybe we should make this smaller, like 1GB or 2GB.