Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

tarun292
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Sep 12, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

@tarun292 tarun292 force-pushed the export-D49204729 branch 2 times, most recently from 6113f7c to 4bcb716 Compare September 13, 2023 05:11
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

@facebook-github-bot
Copy link
Contributor

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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49204729

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1bf2ff4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants