commit | 683ce59446ef4b24746759c4b5c5a91180d3990b | [log] [tgz] |
---|---|---|
author | Etienne Bergeron <etienneb@chromium.org> | Fri Dec 07 19:34:37 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Dec 07 19:34:37 2018 |
tree | a9e96fdb60c8de29fee57ce2f4476aa608d933da | |
parent | 1d732d214b84113106a00eba6c8aaca3304c7998 [diff] |
Change TracingSamplerProfiler observer from async to sync This CL is changing the kind of observer used by the sampling profiler wrapper class. The proposed implementation is to use the sync version which is fixing early startup tracing/sampling. The previous code was using a Async observer to keep the class thread-safe. Unfortunately, the sampling profiler is not able to start early enough on startup. The hooks are at the right place. The reason why it's not working on startup is because the tasks queue is already loaded of startup tasks to be executed on the main thread. Thus, after activating tracing, there is a long gab between the point where the tigger occurs and when the sampling profiler got created and start to collect samples (e.g. OnTraceLogEnabled). To avoid this delay, we prefer using a Sync observer. That forces the class to be thread-safe. R=oysteine@chromium.org CC=​ssid@chromium.org, wittman@chromium.org Change-Id: I02a1deb2f8aa705ccbf5fb6e7026f4588ca1b319 Reviewed-on: https://chromium-review.googlesource.com/c/1359293 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: oysteine <oysteine@chromium.org> Reviewed-by: Ken Rockot <rockot@google.com> Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Cr-Commit-Position: refs/heads/master@{#614784}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .