Make toolchain profiler start/exit automatic. NFC#13985
Conversation
97bff60 to
32df747
Compare
|
I verified this manually by looking at the resulting profiles for a simple hello world build as well as |
|
Works for me. While you are at it, can you move the import of the profiler script to the top of these files? I think at some point to appease flake the code was moved to alphabetical order or something like that, but since we do a nontrivial amount of work at top level of importing scripts, we will skew the profiling results by importing the profiler script after other imports. |
Done. Bear in mind that because the profiler is included at the very top of |
Make the import of `tools/toolchain_profiler.py` which happens exactly once per process the thing that causes profiling to start and use `atexit` to handle exiting.
kripken
left a comment
There was a problem hiding this comment.
I'm not familiar with toolchain_profiler.py but this seems ok.
Is this code well tested?
|
I am currently landing a change to increase testing somewhat: #13416 But no, this code is not well tested. I manually test that this didn't have any noticeable results and worked as expected. |
|
I mean the null-versions of the profiler are very well tested! .. but the |
|
I think @juj already signal approval above.. browser test failures are know and unrealted. |
Make the import of
tools/toolchain_profiler.py(whichhappens exactly once per process) the thing that causes
profiling to start and use
atexitto handle exiting.