Bug 181991 - JSC should use a speculation fence on VM entry/exit
Summary: JSC should use a speculation fence on VM entry/exit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-23 10:09 PST by Filip Pizlo
Modified: 2018-01-23 12:50 PST (History)
12 users (show)

See Also:


Attachments
the patch (3.67 KB, patch)
2018-01-23 10:12 PST, Filip Pizlo
jfbastien: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2018-01-23 10:09:59 PST
Patch forthcoming.
Comment 1 Filip Pizlo 2018-01-23 10:12:04 PST
Created attachment 332035 [details]
the patch
Comment 2 Filip Pizlo 2018-01-23 10:12:11 PST
<rdar://problem/36304751>
Comment 3 Radar WebKit Bug Importer 2018-01-23 10:12:48 PST
<rdar://problem/36781062>
Comment 4 JF Bastien 2018-01-23 10:16:46 PST
Comment on attachment 332035 [details]
the patch

r=me
Comment 5 Mark Lam 2018-01-23 10:17:21 PST
Comment on attachment 332035 [details]
the patch

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

> Source/JavaScriptCore/ChangeLog:10
> +        For a microbenchmark that just calls a native function (supplied via a Objective-C block) in a

/a Objective-C/an Objective-C/.

> Source/JavaScriptCore/ChangeLog:11
> +        tight loop from JS is a 0% regression on x86 and a 11% regression on ARM64.

I suggest /JS is a 0%/JS, performance shows a 0%/.
Comment 6 Filip Pizlo 2018-01-23 10:30:13 PST
Landed in https://trac.webkit.org/changeset/227424/webkit
Comment 7 Saam Barati 2018-01-23 12:39:24 PST
Comment on attachment 332035 [details]
the patch

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

> Source/WTF/wtf/Atomics.h:285
> +#if !OS(WINDOWS)

Should we have someone who works on Windows implement this for them?
Comment 8 Saam Barati 2018-01-23 12:42:31 PST
Comment on attachment 332035 [details]
the patch

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

> Source/JavaScriptCore/runtime/JSLock.cpp:126
> +    WTF::speculationFence();

Do we not want this for entry/exit in and out of other native code. E.g, WebCore bindings?