Bug 149066

Summary: REGRESSION(r189585): run-perf-tests Speedometer fails with a console error
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, benjamin, cdumez, fpizlo, ggaren, mark.lam, mhahnenb, msaboff, nrotem, oliver, saam, sam, webkit-bug-importer
Priority: P1 Keywords: InRadar, Regression
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch
none
the patch msaboff: review+

Description Ryosuke Niwa 2015-09-11 08:13:42 PDT
At r189585:

$ ./Tools/Scripts/run-perf-tests PerformanceTests/Speedometer/ ~/Desktop/speedometer.json 
Path was not found:/Users/rniwa/Desktop/speedometer.json
Running 1 tests
Running Speedometer/Full.html (1 of 1)
RESULT Speedometer: Full: Time= 5276.43625 ms
median= 5279.8225 ms, stdev= 54.5255277219 ms, min= 5151.865 ms, max= 5360.485 ms
Finished: 121.690676 s

At r189586:

$ ./Tools/Scripts/run-perf-tests PerformanceTests/Speedometer/ ~/Desktop/speedometer.json
Path was not found:/Users/rniwa/Desktop/speedometer.json
Running 1 tests
Running Speedometer/Full.html (1 of 1)
ERROR: CONSOLE MESSAGE: line 3285: Cannot call get with 'isDeleted' on an undefined object.
FAILED
Finished: 29.483498 s
Comment 1 Radar WebKit Bug Importer 2015-09-11 08:14:16 PDT
<rdar://problem/22661022>
Comment 2 Filip Pizlo 2015-09-11 13:38:41 PDT
Looking at this now.
Comment 3 Filip Pizlo 2015-09-11 23:10:37 PDT
Created attachment 261047 [details]
the patch
Comment 4 Filip Pizlo 2015-09-11 23:24:21 PDT
Test case:

//@ runMiscNoCJITTest("--useLLInt=false", "--useDFGJIT=false")

function foo(o) {
    return o.i7;
}

var o = {};
for (var i = 0; i < 100; ++i)
    o["i" + i] = i;
for (var i = 0; i < 100; i+=2)
    delete o["i" + i];

for (var i = 0; i < 100; ++i) {
    var result = foo(o);
    if (result != 7)
        throw "Error: bad result: " + result;
}
Comment 5 Filip Pizlo 2015-09-11 23:41:47 PDT
Created attachment 261048 [details]
the patch

And now, with a test.
Comment 6 Michael Saboff 2015-09-12 07:46:03 PDT
Comment on attachment 261048 [details]
the patch

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

> Source/JavaScriptCore/jit/Repatch.cpp:214
> +static bool forceICFailure(ExecState*)

Why the unused ExecState* parameter?

> Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:289
> +inline bool shouldJIT(ExecState* exec, CodeBlock*)

Why the unused CodeBlock* parameter?
Comment 7 Filip Pizlo 2015-09-12 07:54:49 PDT
(In reply to comment #6)
> Comment on attachment 261048 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=261048&action=review
> 
> > Source/JavaScriptCore/jit/Repatch.cpp:214
> > +static bool forceICFailure(ExecState*)
> 
> Why the unused ExecState* parameter?
> 
> > Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:289
> > +inline bool shouldJIT(ExecState* exec, CodeBlock*)
> 
> Why the unused CodeBlock* parameter?

So it's easier to insert bisecting code based on code block or the current code origin.
Comment 8 Michael Saboff 2015-09-12 08:03:21 PDT
Comment on attachment 261048 [details]
the patch

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

r=me

> Source/JavaScriptCore/ChangeLog:21
> +        Debugging bugs like these requires adding ad hoc bisection code in various places. We already
> +        had the basic hooks for this. This patch makes those hooks a bit more useful.

Add that the two unused parameter additions are for this reason.
Comment 9 Filip Pizlo 2015-09-12 13:49:47 PDT
(In reply to comment #8)
> Comment on attachment 261048 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=261048&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/ChangeLog:21
> > +        Debugging bugs like these requires adding ad hoc bisection code in various places. We already
> > +        had the basic hooks for this. This patch makes those hooks a bit more useful.
> 
> Add that the two unused parameter additions are for this reason.

Done.  Thanks!
Comment 10 Filip Pizlo 2015-09-12 14:02:45 PDT
Landed in http://trac.webkit.org/changeset/189658