Bug 143998 - [CMake] Clean up JSC JIT options
Summary: [CMake] Clean up JSC JIT options
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Minor
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on: 143831
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-21 10:35 PDT by Michael Catanzaro
Modified: 2015-04-27 18:32 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.74 KB, patch)
2015-04-21 11:07 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (8.60 KB, patch)
2015-04-21 11:53 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (8.69 KB, patch)
2015-04-22 12:56 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
[CMake] Should be possible for an option to depend on multiple options (3.52 KB, patch)
2015-04-23 08:57 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2015-04-21 10:35:57 PDT
* ENABLE_LLINT_C_LOOP is the opposite of ENABLE_JIT. It would be nonsense to have both or neither enabled, so there's no need for these to be separate options.
* Add ENABLE_DFG_JIT and have ENABLE_FTL_JIT depend on it.
* Add ENABLE_FTL_NATIVE_CALL_INLINING option, dependent on ENABLE_FTL_JIT.

If you currently build with -DENABLE_LLINT_C_LOOP=ON, you will instead want to build with -DENABLE_JIT=OFF. If you currently build with -DENABLE_JIT=ON on a platform that supports baseline JIT but not DFG JIT, you'll need to add -DENABLE_DFG_JIT=OFF.
Comment 1 Filip Pizlo 2015-04-21 10:36:59 PDT
This makes a lot of sense!
Comment 2 Michael Catanzaro 2015-04-21 11:04:40 PDT
Note, this patch in its current form is part of a long chain of patches (hence no r? yet), and needs to be committed alongside the patch in bug #143997 (or changed to not depend on that). Also note I don't touch the Xcode files here in an attempt to not break anything on Macs, only the CMake files, since they did not already have an ENABLE_JIT option. That would be a good follow-up.

I did remove the option from FeatureList.pm, since I think that won't break anything.

Alternative: remove the ENABLE_JIT option from the CMake port, and keep just ENABLE_LLINT_C_LOOP. I thought ENABLE_JIT was a nicer option to present to users, but the Xcode files and FeatureList.pm have ENABLE_LLINT_C_LOOP but not ENABLE_JIT, so this would make things consistent between both ports without requiring changes anywhere but the CMake files.
Comment 3 Michael Catanzaro 2015-04-21 11:07:20 PDT
Created attachment 251242 [details]
Patch
Comment 4 Michael Catanzaro 2015-04-21 11:53:05 PDT
I took the time to do this properly, so it no longer depends on bug #143997.
Comment 5 Michael Catanzaro 2015-04-21 11:53:28 PDT
Created attachment 251248 [details]
Patch
Comment 6 Michael Catanzaro 2015-04-21 11:54:18 PDT
Comment on attachment 251248 [details]
Patch

Ah but it still depends on bug #143831, whoops....
Comment 7 Michael Catanzaro 2015-04-22 12:56:33 PDT
Created attachment 251359 [details]
Patch
Comment 8 WebKit Commit Bot 2015-04-22 19:16:25 PDT
Comment on attachment 251359 [details]
Patch

Clearing flags on attachment: 251359

Committed r183159: <http://trac.webkit.org/changeset/183159>
Comment 9 WebKit Commit Bot 2015-04-22 19:16:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Csaba Osztrogonác 2015-04-23 06:22:47 PDT
Comment on attachment 251359 [details]
Patch

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

> Tools/Scripts/webkitperl/FeatureList.pm:-438
> -    { option => "cloop", desc => "Force use of the llint c loop",
> -      define => "ENABLE_LLINT_C_LOOP", default => 0, value => \$forceCLoop },

With this change we lost build-webkit's --cloop option.
Of course, --cmakeargs="-DENABLE_JIT=0" still works.

(I haven't used --cloop option of build-webkit ever and 
don't plan to do it in the future, just noticed it.)
Comment 11 Michael Catanzaro 2015-04-23 07:45:29 PDT
Ah, I didn't realize that list of options was used for anything besides the default values. I think we should probably bring that back, as otherwise you won't be able to use build-webkit on various architectures.

Options: (a) convert the XCode build to use ENABLE_JIT so that we can restore the option to FeatureList.pm, or (b) revert this patch and instead remove the ENABLE_JIT option from the CMake build.

Maybe (b) is the way to go. When I wrote this patch, I did not realize that only CMake had the ENABLE_JIT option.
Comment 12 Michael Catanzaro 2015-04-23 08:57:46 PDT
Created attachment 251439 [details]
[CMake] Should be possible for an option to depend on multiple options
Comment 13 Michael Catanzaro 2015-04-23 13:17:07 PDT
(Ignore that bogus attachment.)

(In reply to comment #11)
> Options: (a) convert the XCode build to use ENABLE_JIT so that we can
> restore the option to FeatureList.pm, or (b) revert this patch and instead
> remove the ENABLE_JIT option from the CMake build.
> 
> Maybe (b) is the way to go. When I wrote this patch, I did not realize that
> only CMake had the ENABLE_JIT option.

Filip, Ossy, what do you prefer?
Comment 14 Csaba Osztrogonác 2015-04-27 01:56:30 PDT
(In reply to comment #11)
> Ah, I didn't realize that list of options was used for anything besides the
> default values. I think we should probably bring that back, as otherwise you
> won't be able to use build-webkit on various architectures.
> 
> Options: (a) convert the XCode build to use ENABLE_JIT so that we can
> restore the option to FeatureList.pm, or (b) revert this patch and instead
> remove the ENABLE_JIT option from the CMake build.
> 
> Maybe (b) is the way to go. When I wrote this patch, I did not realize that
> only CMake had the ENABLE_JIT option.

I would prefer option (a), I think ENABLE_JIT is more descriptive
name than ENABLE_LLINT_C_LOOP. Additionally they are the opposite
of each other, why should we have two different option?

So I think we should use ENABLE_JIT everywhere,
only the following files should be changed:
- Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:464
- */FeatureDefines.xcconfig
- Platform.h:762
- build-jsc
Comment 15 Michael Catanzaro 2015-04-27 18:32:49 PDT
Aye-aye, see bug #144304.