Bug 221166 - Make check for full HashTables opt-in
Summary: Make check for full HashTables opt-in
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-29 16:18 PST by Tadeu Zagallo
Modified: 2021-01-29 18:17 PST (History)
7 users (show)

See Also:


Attachments
Patch (71.30 KB, patch)
2021-01-29 16:24 PST, Tadeu Zagallo
no flags Details | Formatted Diff | Diff
Patch for landing (6.14 KB, patch)
2021-01-29 17:25 PST, Tadeu Zagallo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tadeu Zagallo 2021-01-29 16:18:12 PST
It's too expensive to always perform the check
Comment 1 Tadeu Zagallo 2021-01-29 16:19:48 PST
<rdar://problem/70902458>
Comment 2 Tadeu Zagallo 2021-01-29 16:24:31 PST
Created attachment 418786 [details]
Patch
Comment 3 Saam Barati 2021-01-29 16:26:54 PST
Comment on attachment 418786 [details]
Patch

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

> Source/WTF/ChangeLog:9
> +        Having the check always on was a regression on Speedometer2.

you should say what you did, e.g, opt in metaallocator
Comment 4 Yusuke Suzuki 2021-01-29 16:27:50 PST
Comment on attachment 418786 [details]
Patch

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

r=me too with one comment.

> Source/WTF/wtf/MetaAllocator.h:197
> +    HashMap<FreeSpacePtr, FreeSpaceNode*, DefaultHash<FreeSpacePtr>, HashTraits<FreeSpacePtr>, HashTraits<FreeSpaceNode*>, true> m_freeSpaceStartAddressMap;
> +    HashMap<FreeSpacePtr, FreeSpaceNode*, DefaultHash<FreeSpacePtr>, HashTraits<FreeSpacePtr>, HashTraits<FreeSpaceNode*>, true> m_freeSpaceEndAddressMap;

Some enum would be better for readability, like,

enum class HashTableHardeningMode : uint8_t {
    None,
    AssertNotFull,
};

And HashMap<FreeSpacePtr, FreeSpaceNode*, DefaultHash<FreeSpacePtr>, HashTraits<FreeSpacePtr>, HashTraits<FreeSpaceNode*>, HashTableHardeningMode:: AssertNotFull>
Comment 5 Tadeu Zagallo 2021-01-29 17:25:34 PST
Created attachment 418793 [details]
Patch for landing
Comment 6 EWS 2021-01-29 18:17:02 PST
Committed r272095: <https://trac.webkit.org/changeset/272095>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418793 [details].