-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Make toolchain profiler start/exit automatic. NFC #13985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
kripken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case lgtm, but probably best that @juj review this too.
|
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.