commit | 5480dd4f6c4a55a2ef09bc355731c5a26c5086ae | [log] [tgz] |
---|---|---|
author | Liquan(Max) Gu <maxlg@chromium.org> | Tue Jun 25 20:56:50 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jun 25 20:56:50 2019 |
tree | 1e00a3796f12ea2d5d2a47ae5932edd6b48601ca | |
parent | a15a5dfd85011bb898f407e8b62a82e156a4769f [diff] |
[LCP] Check tracing enabled before tracing Currently TextPaintTimingDetector and ImagePaintTimingDetector dumps a trace event whenever it finds a new candidate. However, the event won't not be generated when the "loading" category is disabled. When we have any preparation cost for the trace event, the cost would be wasted in this case. For this reason, we add a check in this change. We check whether the event category is enabled before preparing the trace value. In addition, we whitelist trace_event_analyzer.cc for blink tests so that we can test the code path of enabling/disabling the trace category. Bug:976894,978475 Change-Id: Ibca63be435f7f96b2bad64fa3aaffe2df8ba232e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676230 Reviewed-by: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#672258}
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 .