Bug 160033 - Don't run FTL related JSC stress tests on non-FTL platforms
Summary: Don't run FTL related JSC stress tests on non-FTL platforms
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P1 Blocker
Assignee: Csaba Osztrogonác
URL:
Keywords:
: 160058 (view as bug list)
Depends on: 160021 160100
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-21 11:01 PDT by Csaba Osztrogonác
Modified: 2016-07-22 14:24 PDT (History)
9 users (show)

See Also:


Attachments
patch (6.52 KB, patch)
2016-07-21 11:05 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (6.93 KB, patch)
2016-07-22 10:21 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (3.86 KB, patch)
2016-07-22 10:51 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Updated patch (7.50 KB, patch)
2016-07-22 11:52 PDT, Michael Saboff
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2016-07-21 11:01:47 PDT
https://trac.webkit.org/changeset/203440 removed the possibility
to skip redundant tests on non FTL platforms which made testing
terrible slow ( just to be able to paint some bots green ... )

We don't want to run 36k tests instead of 20k tests when 16k
are redundant and don't add anything for test coverage. We
don't want 50% extra test runtime just for fun.

There are 9 active tester buildbot on https://build.webkit.org/waterfall
which suffer from the intrusive change intruduced in r203440 :
(the 3 x86 bots ran redundant tests previously because of another bug )

- There is no FTL-JIT on 32 bit platforms (x86, ARMv7) and there won't be ever.
  - Apple El Capitan 32-bit JSC (BuildAndTest)
  - Apple Yosemite 32-bit JSC (BuildAndTest)
  - Apple Win 7 Release (Tests)
  - Apple Win 7 Debug (Tests)
  - GTK Linux 32-bit Release
  - JSCOnly Linux ARMv7 Thumb2 Release
  - JSCOnly Linux ARMv7 Traditional Release

- FTL-JIT is ready on 64-bit Windows (bug145366), but review process is very slow.
  - no tester bot

- FTL-JIT builds and works more or less on AArch64 Linux (bug144039), but there are 
many crashes on it and nobody is interested in fixing these crashes, so it won't
be enabled in the near future.
  - JSCOnly Linux AArch64 Release


I proposed some renaming in bug160021 to make what Filip wanted originally in r203440.
After bug160021 default will really mean default, it is just a renaming.

Based on bug160021 I'm going to add similar logic to RJST script as we had previously.
My idea is to skip all tests on non-FTL platforms as we skipped previously, but we
don't need any command line option, RJST can determine x86,ARM,Windows platforms
from JSC binary to be able to skip redundant tests.

I don't want to solve all problems now in this bug, it is just firefighting
to fix the 9 bots/platforms above. Later we can refactor test modes for the
real life in present, for example remove --useFTLJIT=false from BASE_OPTIONS
and add it explicitly to modes where we really want to disable FTL JIT.
Comment 1 Csaba Osztrogonác 2016-07-21 11:05:40 PDT
Created attachment 284231 [details]
patch
Comment 2 Csaba Osztrogonác 2016-07-22 02:24:05 PDT
*** Bug 160058 has been marked as a duplicate of this bug. ***
Comment 3 Csaba Osztrogonác 2016-07-22 03:13:40 PDT
Dear JSC reviewers, please review this patch to unbroke JSC testing
on non-FTL bots, eg: Apple internal ARM bots, Apple Windows bots,
Linux ARM bots
Comment 4 Michael Saboff 2016-07-22 09:18:52 PDT
Comment on attachment 284231 [details]
patch

r-

I think this change is more complicated than it needs to be.  For example there is no need to make the runXXX("no-ftl") calls conditional.  Instead of making each FTL related run("...") conditional, only invoke the FTL runFTLxxx methods on FTL platforms.  runDefault would needs some work, either splitting or making passing FTL_OPTIONS conditional.

Also, this doesn't fix the issue for arm64.
Comment 5 Csaba Osztrogonác 2016-07-22 09:34:34 PDT
(In reply to comment #4)
> Comment on attachment 284231 [details]
> patch
> 
> r-
> 
> I think this change is more complicated than it needs to be.  For example
> there is no need to make the runXXX("no-ftl") calls conditional.  Instead of
> making each FTL related run("...") conditional, only invoke the FTL
> runFTLxxx methods on FTL platforms. 

runXXXNoFTL == runXXXDefault on non FTL platforms. We should skip
one of them to avoid redundancy. The intent of r203440 was not
skip the default one, because it is confusing. And the non-FTL
platforms would skip the 3 tests marked to run only default config.

There are more call site for runFTLxxx functions then functions.
I intentionally didn't want to change the original behavior,
that's why I proposed more or less the pre-r203440 state. Of
course I can refactor the patch, as you wanted.
 
> Also, this doesn't fix the issue for arm64.
Good catch, I will add it to the list.

> runDefault would needs some work, either splitting 
> or making passing FTL_OPTIONS conditional.

Passing useFTLJIT=true/false on non-FTL platform doesn't do anything.
We can pass these options unconditionally, but won't have any effect.
Comment 6 Csaba Osztrogonác 2016-07-22 10:21:20 PDT
Created attachment 284342 [details]
Patch

I started to refactor how you suggested. But it seems terrible and it's so easy to make a mistake and run redundant tests. Not to mention if somebody add a //@ runFTLEager to the test directly. I still say I don't want to fix everything in this patch. I only want to have working bots without useless test running before Filip's patch.
Comment 7 Csaba Osztrogonác 2016-07-22 10:51:17 PDT
Created attachment 284346 [details]
Patch

WIP patch. Because stress,mozilla-tests.yaml,regress and jsc-layout-tests.yaml tests are the 95% of all tests, it's more than enough to skip redundant tests from them. I don't care with exotic configs which covers 5-10-50 tests, we can live redundant test cases in these test groups.
Comment 8 Csaba Osztrogonác 2016-07-22 10:56:24 PDT
If we won't agree how to fix the mess after Filip's "cleanup"
in some days, I will apply my original patch --locally--  on 
JSCOnly bots and don't care how do you want to fix it properly.
I won't waste my time to fix what worked properly previously ...
Comment 9 Mark Lam 2016-07-22 11:00:10 PDT
(In reply to comment #8)
> If we won't agree how to fix the mess after Filip's "cleanup"
> in some days, I will apply my original patch --locally--  on 
> JSCOnly bots and don't care how do you want to fix it properly.
> I won't waste my time to fix what worked properly previously ...

Hi Ossy, I see 3 patches.  Are 2 of them obsolete?
Comment 10 Csaba Osztrogonác 2016-07-22 11:07:34 PDT
(In reply to comment #9)
> Hi Ossy, I see 3 patches.  Are 2 of them obsolete?

The 1st one was r- -ed by Mark, then tried to do what Mark suggested,
but I think it would be terrible and error prone (2nd patch).

And then started to try a minimal patch to concentrate the majority
of the tests without caring about exotic test groups. It is the 3rd
one, but it's not tested at all yet.

I'm really confused now, because RJST test groups are giant hacks
and I wanted to avoid fixing everything in this bug. And I don't
and won't have time for it at all. My only one goal is to get back
the possibility to skip redundant tests on non FTL platfors, as much
as we can easily.
Comment 11 Michael Saboff 2016-07-22 11:13:33 PDT
I'm testing a patch now and will post soon.
Comment 12 Mark Lam 2016-07-22 11:16:13 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > Hi Ossy, I see 3 patches.  Are 2 of them obsolete?
> 
> The 1st one was r- -ed by Mark, then tried to do what Mark suggested,
> but I think it would be terrible and error prone (2nd patch).

I think you meant Michael.
Comment 13 Csaba Osztrogonác 2016-07-22 11:17:30 PDT
(In reply to comment #12)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > Hi Ossy, I see 3 patches.  Are 2 of them obsolete?
> > 
> > The 1st one was r- -ed by Mark, then tried to do what Mark suggested,
> > but I think it would be terrible and error prone (2nd patch).
> 
> I think you meant Michael.

Yes, of course. :)
Comment 14 Michael Saboff 2016-07-22 11:52:31 PDT
Created attachment 284355 [details]
Updated patch
Comment 15 Mark Lam 2016-07-22 12:03:10 PDT
Comment on attachment 284355 [details]
Updated patch

r=me if bots are green.
Comment 16 Filip Pizlo 2016-07-22 12:06:48 PDT
Comment on attachment 284355 [details]
Updated patch

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

> Tools/Scripts/run-jsc-stress-tests:-903
> -        runNoFTL
> +        runDefault
>          runAlwaysTriggerCopyPhase
>          if $jitTests
>              runNoLLInt
>              runNoCJITValidatePhases
>              runDFGEager
>              runDFGEagerNoCJITValidate
> -            runDefault
> +            runDFGMaximalFlushPhase
> +
> +            return if !$isFTLPlatform
> +
>              runFTLNoCJITValidate
>              runFTLNoCJITNoPutStackValidate
>              runFTLNoCJITNoInlineValidate
>              runFTLEager
>              runFTLEagerNoCJITValidate
>              runFTLNoCJITSmallPool
> -            runDFGMaximalFlushPhase

Does this mean that we never do runNoFTL when FTL is enabled?  Is that intentional?
Comment 17 Michael Saboff 2016-07-22 13:49:19 PDT
(In reply to comment #16)
> Comment on attachment 284355 [details]
> Updated patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=284355&action=review
> 
> > Tools/Scripts/run-jsc-stress-tests:-903
> > -        runNoFTL
> > +        runDefault
> >          runAlwaysTriggerCopyPhase
> >          if $jitTests
> >              runNoLLInt
> >              runNoCJITValidatePhases
> >              runDFGEager
> >              runDFGEagerNoCJITValidate
> > -            runDefault
> > +            runDFGMaximalFlushPhase
> > +
> > +            return if !$isFTLPlatform
> > +
> >              runFTLNoCJITValidate
> >              runFTLNoCJITNoPutStackValidate
> >              runFTLNoCJITNoInlineValidate
> >              runFTLEager
> >              runFTLEagerNoCJITValidate
> >              runFTLNoCJITSmallPool
> > -            runDFGMaximalFlushPhase
> 
> Does this mean that we never do runNoFTL when FTL is enabled?  Is that
> intentional?

runDefault is that same as runNoFTL with the addition of FTL_OPTIONS.  Therefore we only want one of those.  For platforms with the FTL enabled, we want to use FTL_OPTIONS.  For platforms without the FTL enabled, the FTL_OPTIONS are no-ops.
Comment 18 Mark Lam 2016-07-22 13:50:53 PDT
(In reply to comment #17)
> (In reply to comment #16)
> > Comment on attachment 284355 [details]
> > Updated patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=284355&action=review
> > 
> > > Tools/Scripts/run-jsc-stress-tests:-903
> > > -        runNoFTL
> > > +        runDefault
> > >          runAlwaysTriggerCopyPhase
> > >          if $jitTests
> > >              runNoLLInt
> > >              runNoCJITValidatePhases
> > >              runDFGEager
> > >              runDFGEagerNoCJITValidate
> > > -            runDefault
> > > +            runDFGMaximalFlushPhase
> > > +
> > > +            return if !$isFTLPlatform
> > > +
> > >              runFTLNoCJITValidate
> > >              runFTLNoCJITNoPutStackValidate
> > >              runFTLNoCJITNoInlineValidate
> > >              runFTLEager
> > >              runFTLEagerNoCJITValidate
> > >              runFTLNoCJITSmallPool
> > > -            runDFGMaximalFlushPhase
> > 
> > Does this mean that we never do runNoFTL when FTL is enabled?  Is that
> > intentional?
> 
> runDefault is that same as runNoFTL with the addition of FTL_OPTIONS. 
> Therefore we only want one of those.  For platforms with the FTL enabled, we
> want to use FTL_OPTIONS.  For platforms without the FTL enabled, the
> FTL_OPTIONS are no-ops.

I think Fil meant that on platforms with FTL enabled, we also want to test the no FTL variants.
Comment 19 Michael Saboff 2016-07-22 13:54:41 PDT
Committed r203616: <http://trac.webkit.org/changeset/203616>
Comment 20 Michael Saboff 2016-07-22 14:24:24 PDT
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #16)
> > > Comment on attachment 284355 [details]
> > > Updated patch
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=284355&action=review
> > > 
> > > > Tools/Scripts/run-jsc-stress-tests:-903
> > > > -        runNoFTL
> > > > +        runDefault
> > > >          runAlwaysTriggerCopyPhase
> > > >          if $jitTests
> > > >              runNoLLInt
> > > >              runNoCJITValidatePhases
> > > >              runDFGEager
> > > >              runDFGEagerNoCJITValidate
> > > > -            runDefault
> > > > +            runDFGMaximalFlushPhase
> > > > +
> > > > +            return if !$isFTLPlatform
> > > > +
> > > >              runFTLNoCJITValidate
> > > >              runFTLNoCJITNoPutStackValidate
> > > >              runFTLNoCJITNoInlineValidate
> > > >              runFTLEager
> > > >              runFTLEagerNoCJITValidate
> > > >              runFTLNoCJITSmallPool
> > > > -            runDFGMaximalFlushPhase
> > > 
> > > Does this mean that we never do runNoFTL when FTL is enabled?  Is that
> > > intentional?
> > 
> > runDefault is that same as runNoFTL with the addition of FTL_OPTIONS. 
> > Therefore we only want one of those.  For platforms with the FTL enabled, we
> > want to use FTL_OPTIONS.  For platforms without the FTL enabled, the
> > FTL_OPTIONS are no-ops.
> 
> I think Fil meant that on platforms with FTL enabled, we also want to test
> the no FTL variants.

Added <https://bugs.webkit.org/show_bug.cgi?id=160100> to add back in the no FTL variants.