Bug 136993 - bmalloc: Allocation should be more precise
Summary: bmalloc: Allocation should be more precise
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-21 22:09 PDT by Geoffrey Garen
Modified: 2014-09-23 11:24 PDT (History)
6 users (show)

See Also:


Attachments
Patch (47.40 KB, patch)
2014-09-21 23:01 PDT, Geoffrey Garen
ggaren: review-
Details | Formatted Diff | Diff
Patch (47.83 KB, patch)
2014-09-21 23:02 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (51.14 KB, patch)
2014-09-22 00:29 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (51.57 KB, patch)
2014-09-22 00:30 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (51.65 KB, patch)
2014-09-22 00:43 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (51.59 KB, patch)
2014-09-22 18:37 PDT, Geoffrey Garen
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2014-09-21 22:09:24 PDT
bmalloc: Allocation should be more precise
Comment 1 Geoffrey Garen 2014-09-21 23:01:30 PDT
Created attachment 238450 [details]
Patch
Comment 2 Geoffrey Garen 2014-09-21 23:02:49 PDT
Created attachment 238451 [details]
Patch
Comment 3 WebKit Commit Bot 2014-09-21 23:03:52 PDT
Attachment 238451 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/Heap.cpp:237:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/bmalloc/bmalloc/Heap.cpp:262:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Geoffrey Garen 2014-09-22 00:29:26 PDT
Created attachment 238455 [details]
Patch
Comment 5 Geoffrey Garen 2014-09-22 00:30:19 PDT
Created attachment 238456 [details]
Patch
Comment 6 WebKit Commit Bot 2014-09-22 00:31:30 PDT
Attachment 238456 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/Heap.cpp:237:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/bmalloc/bmalloc/Heap.cpp:262:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Geoffrey Garen 2014-09-22 00:43:34 PDT
Created attachment 238457 [details]
Patch
Comment 8 WebKit Commit Bot 2014-09-22 00:46:33 PDT
Attachment 238457 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/Heap.cpp:237:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/bmalloc/bmalloc/Heap.cpp:262:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Geoffrey Garen 2014-09-22 18:37:57 PDT
Created attachment 238511 [details]
Patch
Comment 10 WebKit Commit Bot 2014-09-22 18:39:08 PDT
Attachment 238511 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/Heap.cpp:237:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/bmalloc/bmalloc/Heap.cpp:262:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Gavin Barraclough 2014-09-23 09:26:47 PDT
Comment on attachment 238457 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=238457&action=review

r+ with discussed scavenge changes.

> Source/bmalloc/ChangeLog:74
> +        (bmalloc::Heap::allocateMediumLineSlowCase): Deleted. Foled into the

Folded?

> Source/bmalloc/bmalloc/Heap.cpp:190
> +void Heap::refillMediumBumpRangeCache(std::lock_guard<StaticMutex>& lock, size_t sizeClass, MediumBumpRangeCache& rangeCache)

Much duplication! so copy!

> Source/bmalloc/bmalloc/Heap.cpp:201
> +    for (size_t lineNumber = 0; lineNumber < end; ++lineNumber) {

Could be worth a comment on these two loops – outer loop finds new disjoint ranges, inner loop coalesces additional lines into a range.

> Source/bmalloc/bmalloc/Heap.cpp:211
> +        while (++lineNumber < end) {

Could be worth a comment on these two loops – outer loop finds new disjoint ranges, inner loop coalesces additional lines into a range.

> Source/bmalloc/bmalloc/Heap.cpp:250
> +MediumPage* Heap::allocateMediumPage(std::lock_guard<StaticMutex>& lock, size_t sizeClass)

Much duplication! so copy!

> Source/bmalloc/bmalloc/Heap.cpp:297
> +void Heap::deallocateMediumLine(std::lock_guard<StaticMutex>& lock, MediumLine* line)

Much duplication! so copy!
Comment 12 Geoffrey Garen 2014-09-23 11:24:10 PDT
Committed r173881: <http://trac.webkit.org/changeset/173881>