Bug 269521

Summary: [JSC] Add option to toggle allocation profiling hooks
Product: WebKit Reporter: David Degazio <d_degazio>
Component: JavaScriptCoreAssignee: David Degazio <d_degazio>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=262827
https://bugs.webkit.org/show_bug.cgi?id=266110

Description David Degazio 2024-02-15 15:53:01 PST
rdar://123044980

In https://bugs.webkit.org/show_bug.cgi?id=262827 we introduced some preprocessor hooks allowing for WebKit contributors to decorate different points in the WebKit allocators with profiling code. However, it's a bit of a nuisance for this profiling to only be toggle-able at build time. In order to allow switching allocation profiling extensions on or off more conveniently, let's add a new option to JSC reserved for use in allocation profiling extensions. The main value of this option is that it will communicate its value through the additional bytes of g_config reserved in https://bugs.webkit.org/show_bug.cgi?id=266110, so it may be linked against and queried in the libPAS/bmalloc layer via external reference to g_config, unlike other JSC options which are managed at a later stage and have a C++ interface.
Comment 1 David Degazio 2024-02-15 16:20:00 PST
Pull request: https://github.com/WebKit/WebKit/pull/24561
Comment 2 EWS 2024-02-16 09:36:33 PST
Committed 274842@main (f76e442c710f): <https://commits.webkit.org/274842@main>

Reviewed commits have been landed. Closing PR #24561 and removing active labels.