Bug 212382 - SamplingProfiler::takeSample() should not assume that ENABLE(WEBASSEMBLY) means Wasm is enabled.
Summary: SamplingProfiler::takeSample() should not assume that ENABLE(WEBASSEMBLY) mea...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-26 12:17 PDT by Mark Lam
Modified: 2020-05-26 14:33 PDT (History)
6 users (show)

See Also:


Attachments
proposed patch. (2.13 KB, patch)
2020-05-26 12:20 PDT, Mark Lam
sbarati: review+
sbarati: commit-queue-
Details | Formatted Diff | Diff
proposed patch. (4.70 KB, patch)
2020-05-26 13:49 PDT, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2020-05-26 12:17:41 PDT
Fixing this will allow sampling profiler tests to run with JSC_useJIT=0 without crashing.
Comment 1 Mark Lam 2020-05-26 12:20:45 PDT
Created attachment 400267 [details]
proposed patch.
Comment 2 Saam Barati 2020-05-26 12:23:25 PDT
Comment on attachment 400267 [details]
proposed patch.

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

> Source/JavaScriptCore/ChangeLog:3
> +        SamplingProfiler::takeSample() should assume that ENABLE(WEBASSEMBLY) means Wasm is enabled.

should => should not
Comment 3 Saam Barati 2020-05-26 12:26:10 PDT
Comment on attachment 400267 [details]
proposed patch.

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

> Source/JavaScriptCore/runtime/SamplingProfiler.cpp:357
> +        Lock unusedLock;
> +        auto wasmCalleesLocker =  holdLock(Wasm::isSupported() ? Wasm::CalleeRegistry::singleton().getLock() : unusedLock);

why not just use Optional<LockHolder>? Seems cleaner than this unusedLock approach
Comment 4 Mark Lam 2020-05-26 13:49:15 PDT
Created attachment 400270 [details]
proposed patch.
Comment 5 EWS 2020-05-26 14:32:54 PDT
Committed r262161: <https://trac.webkit.org/changeset/262161>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400270 [details].
Comment 6 Radar WebKit Bug Importer 2020-05-26 14:33:25 PDT
<rdar://problem/63642209>