[Sampling profiler] Create Unwinders on profiler thread
Moves creation of Unwinders from the profiled thread to the profiler thread on Android, Windows, and Mac. This initialization is expensive on Android -- 50+ ms -- so it's important to not block the profiled thread on performing it. Mac does some work in its unwinder construction so might see a small benefit as well. This is accomplished by passing a factory function for creating the unwinders into StackSamplingProfiler rather than the unwinders themselves. The naming of the classes that create the individual unwinders in ThreadProfiler is updated to call them 'creators', to minimize confusion over multiple levels of factories. Also updates class-level documentation on how to use the profiler. Bug: 1129082 Change-Id: I791538c72dce5c0d04c4f30e2f287fef96da1db6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414773 Commit-Queue: Mike Wittman <wittman@chromium.org> Reviewed-by:Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by:
ssid <ssid@chromium.org> Cr-Commit-Position: refs/heads/master@{#809202}
Showing
Please register or sign in to comment