Bug 229534

Summary: Add more support for JIT operation validation testing.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, cdumez, cmarcelo, ews-watchlist, gyuyoung.kim, keith_miller, msaboff, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
ews-feeder: commit-queue-
proposed patch.
ews-feeder: commit-queue-
proposed patch.
none
proposed patch. saam: review+

Description Mark Lam 2021-08-25 20:57:51 PDT
rdar://81526335
Comment 1 Mark Lam 2021-08-25 21:18:43 PDT
Created attachment 436463 [details]
proposed patch.

Let's try this on the EWS.
Comment 2 Mark Lam 2021-08-25 21:28:39 PDT
Created attachment 436465 [details]
proposed patch.
Comment 3 Mark Lam 2021-08-25 22:48:22 PDT
Created attachment 436474 [details]
proposed patch.
Comment 4 Mark Lam 2021-08-31 19:23:24 PDT
Created attachment 436985 [details]
proposed patch.
Comment 5 Saam Barati 2021-09-01 18:00:21 PDT
Comment on attachment 436985 [details]
proposed patch.

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

r=me

> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:404
>          g_jscConfig.startExecutableMemory = tagCodePtr<ExecutableMemoryPtrTag>(reservation.base);
>          g_jscConfig.endExecutableMemory = tagCodePtr<ExecutableMemoryPtrTag>(reservationEnd);

why not remove these, and switch everyone to using some nice standalone functions that return g_config[0] and g_config[1]?

> Source/bmalloc/bmalloc/GigacageConfig.h:107
> +constexpr size_t startSlotOfGigacageConfig = 2;

maybe it's worth commenting somewhere that the first 2 slots are for the executable bounds?
Comment 6 Mark Lam 2021-09-01 18:28:30 PDT
(In reply to Saam Barati from comment #5)
> Comment on attachment 436985 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=436985&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:404
> >          g_jscConfig.startExecutableMemory = tagCodePtr<ExecutableMemoryPtrTag>(reservation.base);
> >          g_jscConfig.endExecutableMemory = tagCodePtr<ExecutableMemoryPtrTag>(reservationEnd);
> 
> why not remove these, and switch everyone to using some nice standalone
> functions that return g_config[0] and g_config[1]?

I'll try to do this in a separate follow up patch (since this one is already so big).

> > Source/bmalloc/bmalloc/GigacageConfig.h:107
> > +constexpr size_t startSlotOfGigacageConfig = 2;
> 
> maybe it's worth commenting somewhere that the first 2 slots are for the
> executable bounds?

I'll add a comment saying that the first 2 slots are reserve for the use of the ExecutableAllocator.
Comment 7 Mark Lam 2021-09-02 00:21:30 PDT
Thanks for the review.  Landed in r281910: <http://trac.webkit.org/r281910>.