• Jakob Gruber's avatar
    [coverage] Reduce IncBlockCounter overhead · ae6a47ba
    Jakob Gruber authored
    When collecting JS block coverage, we track block execution counts on
    so-called CoverageInfo objects. Generated bytecode and native code
    contains inlined snippets of code to increment the appropriate
    counters.
    
    These used to be implemented as calls to the IncBlockCounter runtime
    function. Each call incurred the entire CEntry overhead.
    
    This CL reduces that overhead by moving logic over into a new
    IncBlockCounter TFS builtin. The builtin is called directly from
    bytecode, and lowered to the same builtin call for optimized code.
    
    Drive-by: Tweak CoverageInfo layout to generate faster code.
    
    Tbr: jarin@chromium.org
    Bug: v8:9149, v8:6000
    Change-Id: I2d7cb0db649edf7c56b5ef5a4683d27b1c34605c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571420Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60981}
    ae6a47ba
linkage.cc 21.3 KB