[webkit-reviews] review granted: [Bug 110560] Code cache size should adapt to workload : [Attachment 189699] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 22 07:22:09 PST 2013


Antti Koivisto <koivisto at iki.fi> has granted Geoffrey Garen
<ggaren at apple.com>'s request for review:
Bug 110560: Code cache size should adapt to workload
https://bugs.webkit.org/show_bug.cgi?id=110560

Attachment 189699: Patch
https://bugs.webkit.org/attachment.cgi?id=189699&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=189699&action=review


r=me

> Source/JavaScriptCore/ChangeLog:11
> +
> +	   (*) 5% PLT arithmetic mean speedup
> +	   (*) 10% PLT geometric mean speedup
> +	   (*) 3.4X microbenchmark speedup
> +	   (*) Reduces initial cache capacity by 16X

Nice!

How does this affect average cache capacity (say over PLT3)?

> Source/JavaScriptCore/runtime/CodeCache.h:156
> +	   if (age > m_capacity) {
> +	       // A requested object is older than the cache's capacity. We can

> +	       // infer that requested objects are subject to high eviction
probability,
> +	       // so we grow the cache to improve our hit rate.
> +	       m_capacity += s_recencyBias * s_oldObjectSamplingMultiplier *
key.length();

Is it plausible that some access pattern (say XHR of lots of unique scripts
with occasional hits to aging cache items) could make cache grow very large
without providing good hit rate? Should there be MaxCacheCapacity?

> Source/JavaScriptCore/runtime/CodeCache.h:190
> +    static const int64_t s_recencyBias = 4;

I would name constants without s_


More information about the webkit-reviews mailing list