Bug 197294 - [bmalloc] Follow-up and fixing bug after r244481
Summary: [bmalloc] Follow-up and fixing bug after r244481
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:
Depends on:
Blocks:
 
Reported: 2019-04-25 14:08 PDT by Yusuke Suzuki
Modified: 2019-04-25 14:54 PDT (History)
2 users (show)

See Also:


Attachments
Patch (14.57 KB, patch)
2019-04-25 14:12 PDT, Yusuke Suzuki
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-04-25 14:08:20 PDT
[bmalloc] Follow-up and fixing bug after r244481
Comment 1 Yusuke Suzuki 2019-04-25 14:12:21 PDT
Created attachment 368268 [details]
Patch
Comment 2 Saam Barati 2019-04-25 14:20:38 PDT
Comment on attachment 368268 [details]
Patch

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

r=me

> Source/bmalloc/bmalloc/IsoHeapImplInlines.h:234
> +    auto getNewAllocationMode = [&] {

you can also make this cleaner by doing:

- removing all assignments to m_lastSlowPathTime in the lambda
- "auto now = std::chrono::steady_clock::now();" outside the lambda.
- then below, you could do: m_lastSlowPathTime = now;
Comment 3 Saam Barati 2019-04-25 14:21:08 PDT
(In reply to Saam Barati from comment #2)
> Comment on attachment 368268 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=368268&action=review
> 
> r=me
> 
> > Source/bmalloc/bmalloc/IsoHeapImplInlines.h:234
> > +    auto getNewAllocationMode = [&] {
> 
> you can also make this cleaner by doing:
> 
> - removing all assignments to m_lastSlowPathTime in the lambda
> - "auto now = std::chrono::steady_clock::now();" outside the lambda.
> - then below, you could do: m_lastSlowPathTime = now;
By "below" I mean after invoking the lambda
Comment 4 Yusuke Suzuki 2019-04-25 14:50:45 PDT
Comment on attachment 368268 [details]
Patch

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

Thanks!

>>> Source/bmalloc/bmalloc/IsoHeapImplInlines.h:234
>>> +    auto getNewAllocationMode = [&] {
>> 
>> you can also make this cleaner by doing:
>> 
>> - removing all assignments to m_lastSlowPathTime in the lambda
>> - "auto now = std::chrono::steady_clock::now();" outside the lambda.
>> - then below, you could do: m_lastSlowPathTime = now;
> 
> By "below" I mean after invoking the lambda

This changes the behavior. I'm not setting m_lastSlowPathTime while executing Shared mode repeatedly intentionally. This is because we would like to check whether allocations takes 1~ from when we first (or first after resetting m_numberOfAllocationsFromSharedInOneCycle) starts Shared mode or last time when we start the fast path. We would like to allow allocating shared cells numObjects times very slowly.
Comment 5 Yusuke Suzuki 2019-04-25 14:53:03 PDT
Committed r244666: <https://trac.webkit.org/changeset/244666>