• Peter Marshall's avatar
    [unwinder] Add a vector-based code page mechanism for arm32 · 285e4d69
    Peter Marshall authored
    Add an API on Isolate that returns a sorted vector of code pages allocated
    within V8. The implementation is designed to be signal-safe, so that the
    user (the UMA sampling profiler) can access this information from a signal
    handler, where allocation and taking locks is prohibited.
    
    This CL adds the machinery for maintaining the list of allocated code
    pages. Further CLs will modify the Unwinder API itself to accept the code
    pages provided by this API.
    
    The unwinder API currently uses the reserved virtual-memory range called
    the CodeRange to identify where all V8 code objects live, but this doesn't
    exist on arm32 or any 32-bit platform, so this approach adds a way to
    expose the location of all valid V8 code objects in a signal-safe way for
    use by the UMA sampling profiler.
    
    On 64-bit, this API always gives the code_range and embedded_code_range, and
    does not maintain a vector of code pages. This is so that we have a unified
    API on 32 and 64-bit that can be used in exactly the same way by embedders.
    
    Design doc:
    https://docs.google.com/document/d/1VGwUult5AHLRk658VetwEHMOmDDxA2eDQs9lDFMZTE0
    
    Bug: v8:8116
    Change-Id: I732509a45121fc54853182481c24d1083275afce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564068
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#65469}
    285e4d69
cctest.status 25.1 KB