Bug 181927 - [YARR] Add diagnosis for YarrJIT failures
Summary: [YARR] Add diagnosis for YarrJIT failures
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-22 02:00 PST by Yusuke Suzuki
Modified: 2018-01-28 20:38 PST (History)
7 users (show)

See Also:


Attachments
Patch (10.14 KB, patch)
2018-01-22 02:02 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (10.16 KB, patch)
2018-01-22 02:10 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (12.96 KB, patch)
2018-01-28 20:35 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2018-01-22 02:00:35 PST
[YARR] Add diagnosis for YarrJIT failures
Comment 1 Yusuke Suzuki 2018-01-22 02:02:38 PST
Created attachment 331905 [details]
Patch
Comment 2 Yusuke Suzuki 2018-01-22 02:10:55 PST
Created attachment 331906 [details]
Patch
Comment 3 Sam Weinig 2018-01-23 13:28:52 PST
Comment on attachment 331906 [details]
Patch

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

> Source/JavaScriptCore/yarr/YarrJIT.cpp:3505
> +    std::optional<JITFailure> m_shouldFallBack;

Perhaps this should be called m_failureReason

> Source/JavaScriptCore/yarr/YarrJIT.h:53
> +enum class JITFailure {

Perhaps a better name is JITFailureReason?

> Source/JavaScriptCore/yarr/YarrJIT.h:85
> +    void setFallBack(std::optional<JITFailure> fallBack) { m_fallBack = fallBack; }

Perhaps a better name here would be setFallBackWithFailureReason (or something like that), since you failure reason enum is not what you are falling back to, but why you are falling back.  I also think this could take a JITFailure (without the optional), since you never seem to call this with nullopt.
Comment 4 Yusuke Suzuki 2018-01-23 20:50:30 PST
Comment on attachment 331906 [details]
Patch

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

>> Source/JavaScriptCore/yarr/YarrJIT.cpp:3505
>> +    std::optional<JITFailure> m_shouldFallBack;
> 
> Perhaps this should be called m_failureReason

Sounds nice, fixed.

>> Source/JavaScriptCore/yarr/YarrJIT.h:53
>> +enum class JITFailure {
> 
> Perhaps a better name is JITFailureReason?

Nice, fixed.

>> Source/JavaScriptCore/yarr/YarrJIT.h:85
>> +    void setFallBack(std::optional<JITFailure> fallBack) { m_fallBack = fallBack; }
> 
> Perhaps a better name here would be setFallBackWithFailureReason (or something like that), since you failure reason enum is not what you are falling back to, but why you are falling back.  I also think this could take a JITFailure (without the optional), since you never seem to call this with nullopt.

OK, sounds nice. Fixed.
Comment 5 Yusuke Suzuki 2018-01-23 20:51:13 PST
Committed r227469: <https://trac.webkit.org/changeset/227469>
Comment 6 Radar WebKit Bug Importer 2018-01-23 20:52:37 PST
<rdar://problem/36808871>
Comment 7 Yusuke Suzuki 2018-01-28 20:35:50 PST
Reopening to attach new patch.
Comment 8 Yusuke Suzuki 2018-01-28 20:35:52 PST
Created attachment 332504 [details]
Patch
Comment 9 EWS Watchlist 2018-01-28 20:37:12 PST
Attachment 332504 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:343:  Wrong number of spaces before statement. (expected: 9)  [whitespace/indent] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Yusuke Suzuki 2018-01-28 20:37:49 PST
Comment on attachment 332504 [details]
Patch

Oops, wrong bug id.