Skip to content

chore(ebpf) python 3.13-rc support #2595

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

Merged
merged 4 commits into from
Oct 30, 2023
Merged

chore(ebpf) python 3.13-rc support #2595

merged 4 commits into from
Oct 30, 2023

Conversation

korniltsev
Copy link
Collaborator

  • PyThreadState.cframe was removed and PyThreadState.current_frame added
  • PyInterpreterFrame.f_code was renamed to PyInterpreterFrame.f_executable

Copy link
Collaborator

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +74 to +76
if classname == "" && filename == "" && name == "" {
continue
}
Copy link
Collaborator

@kolesnikovae kolesnikovae Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious how often it is happening and whether we should keep track of it, like metric or something

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this happening only for frame->owner == FRAME_OWNED_BY_CSTACK, for example the very first frame started by thread.

The python runtime silently discards them https://github.com/python/cpython/blob/e7331365b488382d906ce6733ab1349ded49c928/Python/traceback.c#L991
I could do same thing in ebpf, but that would require tracking extra structure field offset frame->owner which I am lazy to do.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can ignore them for now

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.

2 participants