Bug 238928

Summary: [JSC] Reduce Baseline JIT code size in debug builds
Product: WebKit Reporter: Geza Lore <glore>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Geza Lore 2022-04-07 06:05:38 PDT
[JSC] Reduce Baseline JIT code size in debug builds
Comment 1 Geza Lore 2022-04-07 06:34:40 PDT
Created attachment 456917 [details]
Patch
Comment 2 Geza Lore 2022-04-07 10:36:15 PDT
Created attachment 456940 [details]
Patch
Comment 3 Yusuke Suzuki 2022-04-10 01:45:41 PDT
Comment on attachment 456940 [details]
Patch

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

> Source/JavaScriptCore/jit/JIT.cpp:682
> +#if CPU(X86_64)
> +    jit.subPtr(TrustedImm32(sizeof(void*)), expectedStackPointerGPR); // Call instruction pushed to stack
> +#endif

You can use prologueStackPointerDelta() and sizeof(CallerFrameAndPC) to compute it for all architectures.
Comment 4 Geza Lore 2022-04-11 02:55:41 PDT
Created attachment 457240 [details]
Patch
Comment 5 Geza Lore 2022-04-11 02:56:17 PDT
(In reply to Yusuke Suzuki from comment #3)
> Comment on attachment 456940 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=456940&action=review
> 
> > Source/JavaScriptCore/jit/JIT.cpp:682
> > +#if CPU(X86_64)
> > +    jit.subPtr(TrustedImm32(sizeof(void*)), expectedStackPointerGPR); // Call instruction pushed to stack
> > +#endif
> 
> You can use prologueStackPointerDelta() and sizeof(CallerFrameAndPC) to
> compute it for all architectures.

Neat, thanks. r?
Comment 6 Geza Lore 2022-04-11 04:34:41 PDT
Created attachment 457245 [details]
Patch
Comment 7 Saam Barati 2022-04-11 09:07:55 PDT
Comment on attachment 457245 [details]
Patch

r=me
Comment 8 EWS 2022-04-12 00:52:39 PDT
Committed r292767 (249551@main): <https://commits.webkit.org/249551@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 457245 [details].
Comment 9 Radar WebKit Bug Importer 2022-04-12 00:53:14 PDT
<rdar://problem/91612747>