Bug 221166

Summary: Make check for full HashTables opt-in
Product: WebKit Reporter: Tadeu Zagallo <tzagallo>
Component: Web Template FrameworkAssignee: Tadeu Zagallo <tzagallo>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, sbarati, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

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].