• Mike Wittman's avatar
    [Sampling profiler] Reland "Implement signal-based stack copying in //base/profiler" · 603a50e0
    Mike Wittman authored
    This CL extracts the core stack copying parts of
    tracing::StackUnwinderAndroid into the dedicated base::StackCopierSignal
    class, and adapts it for direct use by the sampling profiler stack
    unwinding implementation. This drops some unneeded code; updates the code
    to run on 32-bit Android, 64-bit Android, and 64-bit Linux platforms;
    and converts the code to use C++ atomics.
    
    The StackUnwinderAndroid implementation will eventually be replaced
    wholesale by the sampling profiler implementation for Android. This CL
    does not attempt to reuse the extracted stack copying implementation on
    its own, in order to avoid introducing bugs in StackUnwinderAndroid due
    to the differing implementations.
    
    The reland enables the StackCopierSignalTest.CopyStackFromOtherThread
    test on 32-bit Android only.
    
    TBR=gab@chromium.org
    
    Bug: 988579, 1018615
    Change-Id: I96704fe4843994721a0eb37896e11bea99be3fda
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884376
    Commit-Queue: Mike Wittman <wittman@chromium.org>
    Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
    Reviewed-by: default avatarCharlie Andrews <charliea@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#710415}
    603a50e0
register_context.h 5.12 KB