Bug 160053 - Teach MarkedSpace how to allocate auxiliary storage
Summary: Teach MarkedSpace how to allocate auxiliary storage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 159658
  Show dependency treegraph
 
Reported: 2016-07-21 14:47 PDT by Filip Pizlo
Modified: 2016-07-22 16:31 PDT (History)
1 user (show)

See Also:


Attachments
it begins (31.36 KB, patch)
2016-07-21 15:18 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
maybe done (43.84 KB, patch)
2016-07-21 16:33 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
it seems to work! (45.08 KB, patch)
2016-07-21 17:21 PDT, Filip Pizlo
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2016-07-21 14:47:56 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2016-07-21 15:18:53 PDT
Created attachment 284266 [details]
it begins
Comment 2 Filip Pizlo 2016-07-21 16:33:53 PDT
Created attachment 284280 [details]
maybe done
Comment 3 Filip Pizlo 2016-07-21 17:21:07 PDT
Created attachment 284288 [details]
it seems to work!
Comment 4 WebKit Commit Bot 2016-07-21 17:23:32 PDT
Attachment 284288 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/heap/MarkedSpace.cpp:206:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Sam Weinig 2016-07-22 14:36:44 PDT
Comment on attachment 284288 [details]
it seems to work!

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

> Source/JavaScriptCore/ChangeLog:20
> +        To make this somewhat nice, this change also fixes how we describe subspaces. Intead of a

Intead -> Instead.
Comment 6 Filip Pizlo 2016-07-22 15:16:12 PDT
Landed in https://trac.webkit.org/changeset/203621
Comment 7 Saam Barati 2016-07-22 16:14:22 PDT
Comment on attachment 284288 [details]
it seems to work!

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

> Source/JavaScriptCore/ChangeLog:26
> +        with DestructionMode::Needed and DestructionMode::NotNeeded, but I felt like that involves

FWIW, I think this is nicer style.

> Source/JavaScriptCore/heap/MarkedSpace.cpp:132
> +            if (functor(subspace.largeAllocator, 0, attributes) == IterationStatus::Done)

It's sort of confusing to use 0 to indicate to the functor that the allocator is the large allocator.
Could we indicate this in another way? Maybe Optional<size_t> or something else?
Or has this been the paradigm for a while?
Comment 8 Filip Pizlo 2016-07-22 16:31:58 PDT
(In reply to comment #7)
> Comment on attachment 284288 [details]
> it seems to work!
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=284288&action=review
> 
> > Source/JavaScriptCore/ChangeLog:26
> > +        with DestructionMode::Needed and DestructionMode::NotNeeded, but I felt like that involves
> 
> FWIW, I think this is nicer style.
> 
> > Source/JavaScriptCore/heap/MarkedSpace.cpp:132
> > +            if (functor(subspace.largeAllocator, 0, attributes) == IterationStatus::Done)
> 
> It's sort of confusing to use 0 to indicate to the functor that the
> allocator is the large allocator.
> Could we indicate this in another way? Maybe Optional<size_t> or something
> else?
> Or has this been the paradigm for a while?

This particular code has always initialized cellSize to 0 for large allocators.