Bug 223388 - Determine if we have useFastJITPermissions on arm64e at runtime instead of hardcoding it as always enabled
Summary: Determine if we have useFastJITPermissions on arm64e at runtime instead of ha...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-17 11:14 PDT by Saam Barati
Modified: 2021-03-17 17:08 PDT (History)
10 users (show)

See Also:


Attachments
patch (9.09 KB, patch)
2021-03-17 11:31 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (9.09 KB, patch)
2021-03-17 11:38 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch for landing (10.11 KB, patch)
2021-03-17 15:26 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2021-03-17 11:14:18 PDT
...
Comment 1 Saam Barati 2021-03-17 11:15:25 PDT
<rdar://74819266>
Comment 2 Saam Barati 2021-03-17 11:31:56 PDT
Created attachment 423509 [details]
patch
Comment 3 Saam Barati 2021-03-17 11:38:39 PDT
Created attachment 423510 [details]
patch
Comment 4 Mark Lam 2021-03-17 12:04:37 PDT
Comment on attachment 423510 [details]
patch

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

r=me with suggested improvement.

> Source/WTF/wtf/PlatformEnableCocoa.h:477
> +#if !defined(ENABLE_SEPARATED_WX_HEAP) && CPU(ARM64)
>  #define ENABLE_SEPARATED_WX_HEAP 1

We used to not build in the code for initializeSeparatedWXHeaps() and jitWriteThunkGenerator() at all on ARM64E.  Now, we do.  Can you add the following to those 2 functions as a sanity check:

    auto exitScope = makeScopeExit([] {
        RELEASE_ASSERT(!g_jscConfig.useFastJITPermissions);
    });
Comment 5 Saam Barati 2021-03-17 12:37:27 PDT
(In reply to Mark Lam from comment #4)
> Comment on attachment 423510 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=423510&action=review
> 
> r=me with suggested improvement.
> 
> > Source/WTF/wtf/PlatformEnableCocoa.h:477
> > +#if !defined(ENABLE_SEPARATED_WX_HEAP) && CPU(ARM64)
> >  #define ENABLE_SEPARATED_WX_HEAP 1
> 
> We used to not build in the code for initializeSeparatedWXHeaps() and
> jitWriteThunkGenerator() at all on ARM64E.  Now, we do.  Can you add the
> following to those 2 functions as a sanity check:
> 
>     auto exitScope = makeScopeExit([] {
>         RELEASE_ASSERT(!g_jscConfig.useFastJITPermissions);
>     });

Sounds good.
Comment 6 Saam Barati 2021-03-17 15:26:32 PDT
Created attachment 423531 [details]
patch for landing
Comment 7 EWS 2021-03-17 17:08:00 PDT
Committed r274602: <https://commits.webkit.org/r274602>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423531 [details].