Skip to content
  • barraclough@apple.com's avatar
    Implement a JIT-code aware sampling profiler for JSC · f51cff3a
    barraclough@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=76855
    
    Reviewed by Oliver Hunt.
    
    To enable the profiler, set the JSC_CODE_PROFILING environment variable to
    1 (no tracing the C stack), 2 (trace one level of C code) or 3 (recursively
    trace all samples).
    
    The profiler requires -fomit-frame-pointer to be removed from the build flags.
    
    * JavaScriptCore.exp:
        - Removed an export.
    * JavaScriptCore.xcodeproj/project.pbxproj:
        - Added new files
    * bytecode/CodeBlock.cpp:
        - For baseline codeblocks, cache the result of canCompileWithDFG.
    * bytecode/CodeBlock.h:
        - For baseline codeblocks, cache the result of canCompileWithDFG.
    * jit/ExecutableAllocator.cpp:
    (JSC::ExecutableAllocator::initializeAllocator):
        - Notify the profiler when the allocator is created.
    (JSC::ExecutableAllocator::allocate):
        - Inform the allocated of the ownerUID.
    * jit/ExecutableAllocatorFixedVMPool.cpp:
    (JSC::ExecutableAllocator::initializeAllocator):
        - Notify the profiler when...
    f51cff3a