Bug 81179 - Add asserts and improve logging in PageCache.
Summary: Add asserts and improve logging in PageCache.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Peters
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 18:25 PDT by Gavin Peters
Modified: 2012-03-16 06:25 PDT (History)
2 users (show)

See Also:


Attachments
Patch (9.22 KB, patch)
2012-03-14 18:35 PDT, Gavin Peters
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Peters 2012-03-14 18:25:40 PDT
Add asserts and improve logging in PageCache.
Comment 1 Gavin Peters 2012-03-14 18:35:58 PDT
Created attachment 131971 [details]
Patch
Comment 2 Gavin Peters 2012-03-14 18:39:01 PDT
The early exits from logCanCacheFrameDecision had the potential to skew histogram data.  Moving the DocumentLoader check to the top, but eliminating the early exits is a compromise that keeps the logged data mostly accurate.

I'm grumpy about making the logging more verbose in some situations, but with the DocumentLoader check moved up top, I couldn't trigger a difference in Chromium.  An alternative is to add a

bool logging = true;

at the top of the f'n, and have the conditions that would have exited early use that to turn logging off? 

Let me know if you prefer that approach.

WDYT?
Comment 3 Brady Eidson 2012-03-15 12:26:46 PDT
Comment on attachment 131971 [details]
Patch

This is just the logging method, this is fine.
Comment 4 Gavin Peters 2012-03-16 05:46:17 PDT
Comment on attachment 131971 [details]
Patch

Thanks Brady.  I just had minor anxiety about the early exits, now the logic is colour-by-numbers identical to the fast nondebug version.
Comment 5 WebKit Review Bot 2012-03-16 06:25:47 PDT
Comment on attachment 131971 [details]
Patch

Clearing flags on attachment: 131971

Committed r110998: <http://trac.webkit.org/changeset/110998>
Comment 6 WebKit Review Bot 2012-03-16 06:25:52 PDT
All reviewed patches have been landed.  Closing bug.