Skip to content

chore(ebpf) py312 support #2577

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 3 commits into from
Oct 25, 2023
Merged

chore(ebpf) py312 support #2577

merged 3 commits into from
Oct 25, 2023

Conversation

korniltsev
Copy link
Collaborator

@korniltsev korniltsev commented Oct 25, 2023

I've tried to document things I've done to enable support for new python version. I hope in the future only first two steps are required(in case only offset values changed). However I can not promise and dont know how to avoid the other changes if something unexpected changed in cpython (field removals, field renames, struct removals)

  • added testdata libpython3.12.so.1.0
  • run python/dwarfdump to regenerate python/version_gen.go
  • profiling init failed because it detected StringSize(PyAsciiObject) is changed and I've previously hardcoded it's size in the ebpf program, I think I will have to unhardcode it
  • add String_size field to py_offset_config struct in pyperf.bpf.c, use the new field instead of hardcoded value
  • regenerate userspace code and bpf program by make bpf/gen
  • pass string size from userspace to bpf via new field
  • profiling init failed again because it could not read autoTSSkey. it was moved from PyRuntimeState->gilstate->runtime_state.autoTSSkey to PyRuntimeState->autoTSSkey
  • adjust tss reading code to read it from new place for 3.12
  • unhardcoded more offsets (PY_OFFSET_PyVarObject_ob_size PY_OFFSET_PyObject_ob_type PY_OFFSET_PyTypeObject_tp_name), "just in case"

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 👍🏻

@korniltsev korniltsev merged commit ddb0f36 into main Oct 25, 2023
@korniltsev korniltsev deleted the pyperf-py312 branch October 25, 2023 09:06
cyriltovena added a commit that referenced this pull request Oct 25, 2023
* Rename deploy-monitoring (#2551)

* Tweak compaction configuration and performance. (#2564)

* Tweak compaction configuration and performance.

* Fixes config tests

* review feedback

* Fixes compaction range block grouping (#2570)

* Update `make docs` procedure (#2567)

Co-authored-by: grafanabot <[email protected]>

* docs: improves naming in rideshare example (#2571)

* Revert "fix: remove "Flamegraph" from timeline chart title (#2565)" (#2566)

* Revert "fix: remove "Flamegraph" from timeline chart title (#2565)"

This reverts commit b4e6cef.

* fix: add time range

* Add support for dashboards datasource filter (#2560)

This commit add support for dashboards datasource filter using a regex named 'datasource_regex'
provided in the config.libsonnet file.

It's done in a similar way than for grafana/mimir.

Signed-off-by: julien.girard <[email protected]>

* Increase default compaction interval (#2575)

* feat(ebpf): add pyperf (#2201)

* Document the new configuration flag PYROSCOPE_AGENT_ENABLED (#2536)

* Ignore block within 3h in the store-gateway (#2579)

* chore(ebpf)  py312 support (#2577)

* add py312 testdata

* chore(ebpf): py 3.12 support

* unhardcode more offsets

* ingest: drop empty pprof profiles (#2580)

* ingest: drop empty pprof profiles

* add testcase

* Make sure loki extracts the right labels (#2582)

* docs: fix the "Type mismatch" error in "Rust client configuration" (#2581)

---------

Signed-off-by: julien.girard <[email protected]>
Co-authored-by: Christian Simon <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: grafanabot <[email protected]>
Co-authored-by: Dmitry Filimonov <[email protected]>
Co-authored-by: Darren Janeczek <[email protected]>
Co-authored-by: Julien Girard <[email protected]>
Co-authored-by: Tolya Korniltsev <[email protected]>
Co-authored-by: Franz Wimmer <[email protected]>
Co-authored-by: Daxin Wang <[email protected]>
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