| Summary: | [bmalloc] Follow-up and fixing bug after r244481 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | saam, webkit-bug-importer | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Yusuke Suzuki
2019-04-25 14:08:20 PDT
Created attachment 368268 [details]
Patch
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; (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 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. Committed r244666: <https://trac.webkit.org/changeset/244666> |