[Clank SSM]: Release read_lock only after thread resumes.
This CL removes StackCopier::Delegate::OnThreadResume and manually resets MetadataProvider in StackSamplerImpl::RecordStackFrames, and enables RecordMetadata() on android (more specifically StackCopiedSignal). |read_lock_| is only acquired: - before CopyStack() on the sampling thread. Since there is only 1 sampling thread per process, this won't have any contention. - in TryReclaimInactiveSlots() with |read_lock_.Try()|. Failing to acquire delays ReclaimInactiveSlots(). Since read_lock_ is only held during stack capture (compared to stack walking which takes ~3x as long), starvation is unlikely to affect TryReclaimInactiveSlots(). Bug: 1056283 Change-Id: I4f0ef3e8c3641ec7b7258da519c3fba519fb096b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154738 Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by:Mike Wittman <wittman@chromium.org> Cr-Commit-Position: refs/heads/master@{#763420}
Showing
This diff is collapsed.
Please register or sign in to comment