Skip to content

Conversation

@tzanko-matev
Copy link
Contributor

Every event callback receives a _code argument which is of the Python type CodeObject. We created a CodeObjectWrapper type which wraps this object for two purposes:

  1. To expose an easier to use interface which would focus on what we need to implement a tracer
  2. To minimize performance hit by caching the code object data that we fetch from the Python object.

A code object corresponds to the body of a function or a module. With our wrapper and registry we guarantee that each code object is processed at most once.

@tzanko-matev tzanko-matev merged commit f760089 into main Sep 15, 2025
2 checks passed
@tzanko-matev tzanko-matev deleted the codetype-interface branch September 15, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants