[gn] Add trace entries for loading and blocking on imports
This adds trace entries for loading imports and for blocking on an import for longer than 20ms. These make gn's tracelog significantly easier to understand when imported files take a long time to process. For example, in the Chrome build on Mac //build/toolchain/mac/BUILD.gn blocks for ~240ms running sdk_info.py because //build/config/mac/mac_sdk.gni runs that script and //ui/base/BUILD.gn blocks for ~350ms because it is waiting for the import lock on mac_sdk.gni to be released. Without these traces, it is not immediately obvious why //build/toolchain/mac/BUILD.gn is running that script and it is very unclear why //ui/base/BUILD.gn takes so long. Review-Url: https://codereview.chromium.org/2424233002 Cr-Commit-Position: refs/heads/master@{#427151}
Showing
Please register or sign in to comment