• ggaren@apple.com's avatar
    Code cache size should adapt to workload · 275634c8
    ggaren@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=110560
    
    Reviewed by Antti Koivisto.
    
    (*) 5% PLT arithmetic mean speedup
    (*) 10% PLT geometric mean speedup
    (*) 3.4X microbenchmark speedup
    (*) Reduces initial cache capacity by 16X
    
    * runtime/CodeCache.cpp:
    (JSC::CodeCache::CodeCache): Updated for interface change.
    
    * runtime/CodeCache.h:
    (JSC::SourceCodeValue::SourceCodeValue):
    (SourceCodeValue): Turned the cache value into a struct so it can track its age.
    
    (CodeCacheMap):
    (JSC::CodeCacheMap::CodeCacheMap):
    (JSC::CodeCacheMap::find):
    (JSC::CodeCacheMap::set):
    (JSC::CodeCacheMap::clear):
    (JSC::CodeCacheMap::pruneIfNeeded):
    (CodeCache): Grow and shrink in response to usage.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    275634c8
CodeCache.cpp 6.23 KB