[webkit-reviews] review granted: [Bug 216056] [bmalloc] Remove code duplication from small bump ranges. : [Attachment 407916] Refactoring
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 4 12:51:40 PDT 2020
Yusuke Suzuki <ysuzuki at apple.com> has granted Basuke Suzuki
<Basuke.Suzuki at sony.com>'s request for review:
Bug 216056: [bmalloc] Remove code duplication from small bump ranges.
https://bugs.webkit.org/show_bug.cgi?id=216056
Attachment 407916: Refactoring
https://bugs.webkit.org/attachment.cgi?id=407916&action=review
--- Comment #5 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 407916
--> https://bugs.webkit.org/attachment.cgi?id=407916
Refactoring
View in context: https://bugs.webkit.org/attachment.cgi?id=407916&action=review
Can you run MallocBench to ensure that this does not affect on the performance?
Because this code is super critical path in bmalloc.
> Source/bmalloc/bmalloc/Heap.cpp:372
> +inline void allocateSmallBumpRangesInline(
Let's put BINLINE since this is super critical path which we should ensure that
this is always inlined regardless of compiler's decision.
> Source/bmalloc/bmalloc/Heap.cpp:385
> + lineCache[page->sizeClass()].push(page);
Let's pass sizeClass and use it.
> Source/bmalloc/bmalloc/Heap.cpp:403
> + auto sizeClass = page->sizeClass();
Let's use passed sizeClass.
> Source/bmalloc/bmalloc/Heap.h:172
> + allocateSmallBumpRangesByMetadata(lock, page, allocator, rangeCache,
lineCache);
> + else
> + allocateSmallBumpRangesByObject(lock, page, allocator, rangeCache,
lineCache);
Let's just pass `sizeClass` too.
More information about the webkit-reviews
mailing list