-
Notifications
You must be signed in to change notification settings - Fork 607
Add macros and helper classes in event_tracer needed for profiling #294
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
This pull request was exported from Phabricator. Differential Revision: D49204729 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D49204729 |
6113f7c
to
4bcb716
Compare
This pull request was exported from Phabricator. Differential Revision: D49204729 |
4bcb716
to
de59943
Compare
This pull request was exported from Phabricator. Differential Revision: D49204729 |
de59943
to
d1efb70
Compare
This pull request was exported from Phabricator. Differential Revision: D49204729 |
d1efb70
to
0dc74bf
Compare
This pull request was exported from Phabricator. Differential Revision: D49204729 |
0dc74bf
to
3e06aee
Compare
This pull request was exported from Phabricator. Differential Revision: D49204729 |
…294) Summary: All the internal invocations (inside ExecuTorch codebase) of event_tracer will be controlled through the macros added in this diff. The benefit of this is that we can leave these hooks in the hot path and when the flag is disabled they essentially compile to a no-op in prod releases. It's also ensured that in all these macros if we pass in a `nullptr` as event_tracer (default case if user doesn't pass in one when method is created) we just return immediately. The specific macros added here are only meant to be used inside the ExecuTorch codebase as the header explains. Reviewed By: dbort Differential Revision: D49204729
3e06aee
to
ad6c854
Compare
This pull request was exported from Phabricator. Differential Revision: D49204729 |
This pull request has been merged in 1bf2ff4. |
Summary:
All the internal invocations (inside ExecuTorch codebase) of event_tracer will be controlled through the macros added in this diff. The benefit of this is that we can leave these hooks in the hot path and when the flag is disabled they essentially compile to a no-op in prod releases.
It's also ensured that in all these macros if we pass in a
nullptr
as event_tracer (default case if user doesn't pass in one when method is created) we just return immediately.The specific macros added here are only meant to be used inside the ExecuTorch codebase as the header explains.
Differential Revision: D49204729