Summary: | New PageCache histogram for tracking the highest leverage frame reject reasons. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gavin Peters <gavinp> | ||||||||
Component: | New Bugs | Assignee: | Gavin Peters <gavinp> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | beidson, cbentzel, dinu.jacob, mitz, ossy, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Gavin Peters
2012-03-16 09:18:18 PDT
The current chromium FrameClientImpl always denies page cache; but that's easily fixable. This histogram tracks which rejection causes occur alone with that cause. I'm particularly interested in knowing how many more pages would work in the page cache if we could get plugins in. Created attachment 132295 [details]
Patch
Brady, WDYT? Comment on attachment 132295 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132295&action=review > Source/WebCore/history/PageCache.cpp:281 > + ASSERT(frameRejectReasons & (1 << ClientDeniesCaching)); Should I add: COMPILE_ASSERT(NumberOfReasonsPageCannotBeInPageCache <= 32, ReasonPageCannotBeInPageCacheDoesNotFitIn32Bits); here? I don't expect the code will live that long, but it seems a good idea. Comment on attachment 132295 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132295&action=review > Source/WebCore/history/PageCache.cpp:282 > + const unsigned v = frameRejectReasons & ~(1 << ClientDeniesCaching); v ? Can we give this variable a name that explains what it is? Perhaps reasonsForRejectingFrameOtherThanClientDeniesCaching? > Source/WebCore/history/PageCache.cpp:294 > + int index = 0; > + if (v & 0xFFFF0000) > + index = 16; > + if (v & 0xFF00FF00) > + index += 8; > + if (v & 0xF0F0F0F0) > + index += 4; > + if (v & 0xCCCCCCCC) > + index += 2; > + if (v & 0xAAAAAAAA) > + index += 1; Can you factor this out into a helper function. This logic seems pretty general. That will help folks understand what this code is doing. Created attachment 132806 [details]
Patch
Comment on attachment 132806 [details]
Patch
Here's the remediated patch; I'll let this bake on EWS for a bit, and cq+ it later today.
Comment on attachment 132806 [details] Patch Attachment 132806 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/11994271 Created attachment 132808 [details]
Patch
Comment on attachment 132808 [details] Patch Clearing flags on attachment: 132808 Committed r111391: <http://trac.webkit.org/changeset/111391> All reviewed patches have been landed. Closing bug. It broke debug builds: cc1plus: warnings being treated as errors ../../../../Source/WebCore/history/PageCache.cpp:86: error: ‘int WebCore::indexOfSingleBit(int32_t)’ defined but not used It seems some ifdef guard is missing somewhere. Yes, I did. Patch coming. mitz fixed that failure in r111391. |