Skip to content
  • fpizlo@apple.com's avatar
    CodeBlock memory cost reporting should be rationalized · 7c084e07
    fpizlo@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=120615
    
    Source/JavaScriptCore: 
    
    Reviewed by Darin Adler.
            
    Report the size of the instruction stream, and then remind the GC that we're
    using memory when we trace.
            
    This is a slight slow-down on some JSBench tests because it makes us GC a
    bit more frequently. But I think it's well worth it; if we really want those
    tests to GC less frequently then we can achieve that through other kinds of
    tuning. It's better that the GC knows that CodeBlocks do in fact use memory;
    what it does with that information is a somewhat orthogonal question.
    
    * bytecode/CodeBlock.cpp:
    (JSC::CodeBlock::CodeBlock):
    (JSC::CodeBlock::visitAggregate):
    
    Source/WTF: 
    
    Reviewed by Darin Adler.
    
    * wtf/RefCountedArray.h:
    (WTF::RefCountedArray::refCount):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7c084e07