Patch forthcoming.
<rdar://problem/36968095>
Created attachment 332498 [details] the patch
Comment on attachment 332498 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=332498&action=review > Source/JavaScriptCore/heap/LargeAllocation.cpp:41 > + size_t sizeIncludingDistancing = sizeBeforeDistancing + distancing; We don’t have any JIT code that needs to be updated to also do this? Do we not inline large allocations in the JIT?
(In reply to Saam Barati from comment #3) > Comment on attachment 332498 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=332498&action=review > > > Source/JavaScriptCore/heap/LargeAllocation.cpp:41 > > + size_t sizeIncludingDistancing = sizeBeforeDistancing + distancing; > > We don’t have any JIT code that needs to be updated to also do this? Do we > not inline large allocations in the JIT? Only small allocations are inlined. Large allocations are very complicated to do. Here's a GC thinking trick: the cost of an allocation "hides behind" the cost of initializing every element. Because any not-totally-dumb allocation would be followed by at least an initialization of every element. Large allocations mean allocating at least 8000 bytes. Whether or not you inline a function call has infinitesimal cost compared to the cost of initializing 8000 bytes. Therefore, we don't inline large allocations.
Landed in Landed in https://trac.webkit.org/changeset/227721/webkit
(In reply to Filip Pizlo from comment #4) > (In reply to Saam Barati from comment #3) > > Comment on attachment 332498 [details] > > the patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=332498&action=review > > > > > Source/JavaScriptCore/heap/LargeAllocation.cpp:41 > > > + size_t sizeIncludingDistancing = sizeBeforeDistancing + distancing; > > > > We don’t have any JIT code that needs to be updated to also do this? Do we > > not inline large allocations in the JIT? > > Only small allocations are inlined. Large allocations are very complicated > to do. > > Here's a GC thinking trick: the cost of an allocation "hides behind" the > cost of initializing every element. Because any not-totally-dumb allocation > would be followed by at least an initialization of every element. > > Large allocations mean allocating at least 8000 bytes. > > Whether or not you inline a function call has infinitesimal cost compared to > the cost of initializing 8000 bytes. > > Therefore, we don't inline large allocations. Makes sense.