[Sampling profiler] Fix GetStackBaseAddress() logic
pthread_attr_getstack returns the lowest address in the stack allocation, so the size must be added to get the base address. Also adds logic to cache the main thread base address to avoid performance overhead on Android. This is modeled after similar logic in GetStackEnd() in base/debug/stack_trace.cc. Bug: 988579 Change-Id: Ia31b85afafc98b61dc60eb2c0d0ab64ba70877c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869831 Commit-Queue: Mike Wittman <wittman@chromium.org> Reviewed-by:Charlie Andrews <charliea@chromium.org> Cr-Commit-Position: refs/heads/master@{#709076}
Showing
Please register or sign in to comment