Bug 130176

Summary: WebKit shouldn't crash on uniprocessor machines
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, mmirman, msaboff, nrotem, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch msaboff: review+, fpizlo: commit-queue+

Description Filip Pizlo 2014-03-12 21:41:24 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2014-03-12 21:56:52 PDT
Created attachment 226574 [details]
the patch
Comment 2 Geoffrey Garen 2014-03-12 22:22:32 PDT
Comment on attachment 226574 [details]
the patch

r=me
Comment 3 Michael Saboff 2014-03-12 22:36:17 PDT
Comment on attachment 226574 [details]
the patch

It seems to me that the "minimum" in computeNumberOfWorkerThreads() is not really the minimum after the subtraction of 1 in Options.h.  Could computeNumberOfWorkerThreads() always have a true minimum of 1 and pass 1 or 7 as the maximum?  Or subtract the 1 in computeNumberOfWorkerThreads. Seems a little better to have all the min/max calculation in one place, computeNumberOfWorkerThreads.
Comment 4 Michael Saboff 2014-03-12 22:37:25 PDT
Comment on attachment 226574 [details]
the patch

Didn't mean to change the r+ from Geoff.
Comment 5 Filip Pizlo 2014-03-12 22:46:04 PDT
(In reply to comment #3)
> (From update of attachment 226574 [details])
> It seems to me that the "minimum" in computeNumberOfWorkerThreads() is not really the minimum after the subtraction of 1 in Options.h.  Could computeNumberOfWorkerThreads() always have a true minimum of 1 and pass 1 or 7 as the maximum?  Or subtract the 1 in computeNumberOfWorkerThreads. Seems a little better to have all the min/max calculation in one place, computeNumberOfWorkerThreads.

Yeah it's weird. It's the result of sharing this function with the GC. The GC wants to know the number of worker threads including the main thread while the JIT wants to know the number of worker threads excluding the main thread. The minus-1 is the exclusion of the main thread.
Comment 6 Filip Pizlo 2014-03-13 12:15:19 PDT
Landed in http://trac.webkit.org/changeset/165553