WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
216056
[bmalloc] Remove code duplication from small bump ranges.
https://bugs.webkit.org/show_bug.cgi?id=216056
Summary
[bmalloc] Remove code duplication from small bump ranges.
Basuke Suzuki
Reported
2020-09-01 15:37:14 PDT
Both byMetadata and byObject share same logic and can be refactored.
Attachments
PATCH
(827 bytes, patch)
2020-09-02 20:54 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
PATCH
(8.95 KB, patch)
2020-09-02 20:57 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
Fix debug build
(8.26 KB, patch)
2020-09-03 10:35 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
Refactoring
(9.26 KB, patch)
2020-09-03 14:48 PDT
,
Basuke Suzuki
ysuzuki
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2020-09-02 20:54:29 PDT
Created
attachment 407860
[details]
PATCH
Basuke Suzuki
Comment 2
2020-09-02 20:57:17 PDT
Created
attachment 407861
[details]
PATCH
Basuke Suzuki
Comment 3
2020-09-03 10:35:03 PDT
Created
attachment 407890
[details]
Fix debug build
Basuke Suzuki
Comment 4
2020-09-03 14:48:05 PDT
Created
attachment 407916
[details]
Refactoring
Yusuke Suzuki
Comment 5
2020-09-04 12:51:40 PDT
Comment on
attachment 407916
[details]
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.
Radar WebKit Bug Importer
Comment 6
2020-09-08 15:38:16 PDT
<
rdar://problem/68534246
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug