Bug 164788

Summary: It should be possible to disable concurrent GC timeslicing
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 149432    
Attachments:
Description Flags
the patch saam: review+

Description Filip Pizlo 2016-11-15 13:47:00 PST
This will be an excellent testing configuration since it maximizes the chances of race conditions causing things to go terribly wrong.
Comment 1 Filip Pizlo 2016-11-15 13:52:42 PST
Created attachment 294875 [details]
the patch
Comment 2 Saam Barati 2016-11-15 13:55:24 PST
Comment on attachment 294875 [details]
the patch

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

r=me

> Source/JavaScriptCore/ChangeLog:18
> +        The idea is that we will usually use this in conjunction with collectContinuously=true

Is it worth just setting useCollectorTimeslicing=false when collectContinuously=true inside the compute dependent options function?

> Source/JavaScriptCore/heap/Heap.cpp:686
> +                // Disabling collector timeslicing is meant to be used together with
> +                // --collectContinuously=true to maximize the opportunity for harmful races.

Might be worth mentioning this in the options file.

> Source/JavaScriptCore/runtime/Options.h:197
> +    v(bool, useCollectorTimeslicing, true, Normal, nullptr) \

It's probably worth adding a description here.
Comment 3 Filip Pizlo 2016-11-15 13:58:13 PST
(In reply to comment #2)
> Comment on attachment 294875 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=294875&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/ChangeLog:18
> > +        The idea is that we will usually use this in conjunction with collectContinuously=true
> 
> Is it worth just setting useCollectorTimeslicing=false when
> collectContinuously=true inside the compute dependent options function?

No, because I want to be able to test continuous collection with collector timeslicing.  That will shake out races in the stop-resume code.

> 
> > Source/JavaScriptCore/heap/Heap.cpp:686
> > +                // Disabling collector timeslicing is meant to be used together with
> > +                // --collectContinuously=true to maximize the opportunity for harmful races.
> 
> Might be worth mentioning this in the options file.
> 
> > Source/JavaScriptCore/runtime/Options.h:197
> > +    v(bool, useCollectorTimeslicing, true, Normal, nullptr) \
> 
> It's probably worth adding a description here.

Can you think of anything more clever than "use collector timeslicing"?
Comment 4 Filip Pizlo 2016-11-15 14:02:22 PST
Landed in https://trac.webkit.org/changeset/208754