<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>218201</bug_id>
          
          <creation_ts>2020-10-26 13:14:17 -0700</creation_ts>
          <short_desc>[WPE][GTK] Ensure either ENABLE_JIT or ENABLE_C_LOOP is enabled(?)</short_desc>
          <delta_ts>2020-10-27 07:30:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>annulen</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>guijemont</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sergio</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1701582</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-26 13:14:17 -0700</bug_when>
    <thetext>In bug #217989, I mentioned that Red Hat and SUSE accidentally shipped WebKit builds with both JIT and cloop disabled. i.e. JSC was using assembler-based llint interpreter rather than cloop. Carlos Lopez requested we add a check to prevent this from happening:

(In reply to Carlos Alberto Lopez Perez from comment #12)
&gt; I think we should add a check in cmake to ensure that one (and only one) of
&gt; JIT or C_LOOP is enabled, so that we don&apos;t allow building with both options
&gt; disabled (or with both enabled)

That makes sense to me. I would do this only in OptionsGTK.cmake and OptionsWPE.cmake, though, because I know Apple does not want that restriction for its ports, and we don&apos;t want to make transitioning to CMake any harder. But because ENABLE_C_LOOP and ENABLE_JIT are both PRIVATE settings, and WebKitFeatures.cmake normally ensures exactly one or the other is always enabled, checking to ensure it hasn&apos;t somehow happened probably makes sense for us. We could change that and remove this restriction if Igalia JSC developers ever want to do so, but that&apos;s the status quo currently, and enforcing it would avoid mistakes where we accidentally ship with a different JSC than everybody else, with our own special bugs.

Counterargument: we don&apos;t support changing the values of PRIVATE settings, and this error will never happen if you don&apos;t do that. If bug #217989 is fixed, then distros will no longer have to mess with PRIVATE settings, so there is less value in adding that check. Alternative: maybe you really do know what you&apos;re doing and intentionally want to experiment with both JIT and cloop disabled? If so, then removing this check manually will be annoying.

Anyway, I&apos;ll submit a patch, and we can see what people think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701596</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-26 13:37:04 -0700</bug_when>
    <thetext>The more I think about this, the more I kinda don&apos;t want to do it. If you mess with private options, you should know what you&apos;re doing, right? And I imagine this configuration could be useful for JSC developers?

Anyway, no strong opinion from me. Patch is incoming regardless.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701597</commentid>
    <comment_count>2</comment_count>
      <attachid>412350</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-26 13:39:30 -0700</bug_when>
    <thetext>Created attachment 412350
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701626</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-10-26 14:27:21 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; In bug #217989, I mentioned that Red Hat and SUSE accidentally shipped
&gt; WebKit builds with both JIT and cloop disabled. i.e. JSC was using
&gt; assembler-based llint interpreter rather than cloop. 

I&apos;m curious.. 

Does JSC work fine with this combination (both JIT and C_LOOP disabled) ? I thought this was not supported, but maybe it is?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701640</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-26 14:43:34 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #3)
&gt; I&apos;m curious.. 
&gt; 
&gt; Does JSC work fine with this combination (both JIT and C_LOOP disabled) ? I
&gt; thought this was not supported, but maybe it is?

I think it works fine? It ought to work, but I&apos;m not certain if it actually does.

It&apos;s &quot;not supported&quot; at the GTK/WPE public build options level. It *is* supported at the JSC level. (JSC devs would know way more about this than me, but I&apos;m pretty sure Apple ships this configuration on some device. Maybe watchOS?) That&apos;s why I kinda think we should not commit this. As long as we don&apos;t *have* to use private options to make WebKit work (as we currently must, bug #217989), then people probably won&apos;t use the private options unless they know what they&apos;re doing... hopefully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701777</commentid>
    <comment_count>5</comment_count>
    <who name="Xan Lopez">xan.lopez</who>
    <bug_when>2020-10-26 23:29:51 -0700</bug_when>
    <thetext>Just to clarify, since I feel there could be a slight confusion here: CLOOP is another variant of LLInt. The C++, portable one, instead of the native implementations (x86_64, various flavors of ARM, MIPS, etc). Logically it sits at the same level than LLInt in this conversation.

That being said...

CLOOP and JIT disabled is a reasonable combination that is used by people in the real world, and is used when developing and debugging the engine itself (although in that case we typically disable tiers at runtime). It just means you only have the interpreter available and you are using the native implementations instead of CLOOP, the C++/portable one.

CLOOP and JIT enabled, as far as I know, will not work, because there&apos;s an assumption in JSC about LLInt/baseline JIT sharing stack representations, among other things. In practice I also don&apos;t know who would bother making the baseline JIT work but leave LLInt with only the CLOOP variant.

So it *could* make sense to prevent the previous combination to be enabled, but not sure this makes much sense. The way I see it distros should just get good defaults for their architectures, and not mess too much with these things because they are unlikely to get it right unless they have a pretty decent understanding of JSC, which seems overkill for a distributor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701809</commentid>
    <comment_count>6</comment_count>
    <who name="Guillaume Emont">guijemont</who>
    <bug_when>2020-10-27 03:23:09 -0700</bug_when>
    <thetext>(In reply to Xan Lopez from comment #5)
&gt; Just to clarify, since I feel there could be a slight confusion here: CLOOP
&gt; is another variant of LLInt. The C++, portable one, instead of the native
&gt; implementations (x86_64, various flavors of ARM, MIPS, etc). Logically it
&gt; sits at the same level than LLInt in this conversation.
&gt; 
&gt; That being said...
&gt; 
&gt; CLOOP and JIT disabled is a reasonable combination that is used by people in
&gt; the real world, and is used when developing and debugging the engine itself
&gt; (although in that case we typically disable tiers at runtime). It just means
&gt; you only have the interpreter available and you are using the native
&gt; implementations instead of CLOOP, the C++/portable one.

To add to that point: this configuration (LLInt with asm backend, no JIT) is also likely to be the fastest combination available for environment where a JIT is not possible (e.g. due to a security policy not allowing JITs, I think that might be the case on the Playstation for instance).

&gt; 
&gt; So it *could* make sense to prevent the previous combination to be enabled,
&gt; but not sure this makes much sense. The way I see it distros should just get
&gt; good defaults for their architectures, and not mess too much with these
&gt; things because they are unlikely to get it right unless they have a pretty
&gt; decent understanding of JSC, which seems overkill for a distributor.

+1 to that. I am also thinking that this issue could be better addressed by providing better documentation on the subject, which hopefully would avoid confusion in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701814</commentid>
    <comment_count>7</comment_count>
      <attachid>412350</attachid>
    <who name="Guillaume Emont">guijemont</who>
    <bug_when>2020-10-27 03:32:30 -0700</bug_when>
    <thetext>Comment on attachment 412350
Patch

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

Not a reviewer, but I disagree with this change, as it&apos;s useful to allow this configuration, as explained in other comments.

&gt; ChangeLog:13
&gt; +        different JSC than everybody else, with special codepaths and special bugs.

There aren&apos;t much specific codepaths that asm LLInt+no JIT would take, compared to when the JIT is enabled. All the code goes through the LLInt before being JIT&apos;ed, so this code path is well tested. Also, EWS and buildbots run tests with `--useJIT=false` (and LLInt with asm backend), which has very similar codepaths to the case you want to forbid.

Are there specific bugs you encountered that happened only in this configuration?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701861</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-27 07:29:33 -0700</bug_when>
    <thetext>(In reply to Guillaume Emont from comment #7)
&gt; Not a reviewer, but I disagree with this change, as it&apos;s useful to allow
&gt; this configuration, as explained in other comments.

OK, I&apos;ll close this then.

(In reply to Guillaume Emont from comment #7)
&gt; Are there specific bugs you encountered that happened only in this
&gt; configuration?

Nope. Either it works fine, or nobody has tested it and complained that it doesn&apos;t. ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701862</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-27 07:30:45 -0700</bug_when>
    <thetext>(In reply to Xan Lopez from comment #5)
&gt; The way I see it distros should just get
&gt; good defaults for their architectures, and not mess too much with these
&gt; things because they are unlikely to get it right unless they have a pretty
&gt; decent understanding of JSC, which seems overkill for a distributor.

Currently we do the right thing for all architectures except aarch64, bug #217989. Any comment in that issue would be great.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>412350</attachid>
            <date>2020-10-26 13:39:30 -0700</date>
            <delta_ts>2020-10-27 07:29:40 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-218201-20201026153932.patch</filename>
            <type>text/plain</type>
            <size>2444</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiB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