Skip to content

Commit

Permalink
ebpf(python): update offsets for new pythons (#3035)
Browse files Browse the repository at this point in the history
  • Loading branch information
korniltsev authored Feb 28, 2024
1 parent c1ccb50 commit c08b736
Show file tree
Hide file tree
Showing 6 changed files with 463 additions and 4 deletions.
161 changes: 158 additions & 3 deletions ebpf/python/python_offsets_gen_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

155 changes: 155 additions & 0 deletions ebpf/python/python_offsets_gen_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ebpf/python/tss.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
)

// todo split offsets validation and offset usage into separate routines
func GetTSSKey(pid uint32, version Version, offsets *UserOffsets, autoTLSkeyAddr, pyRuntime uint64, libc *PerfLibc) (int32, error) {
fd, err := os.Open(fmt.Sprintf("/proc/%d/mem", pid))
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions ebpf/python/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Version struct {
var Py313 = &Version{Major: 3, Minor: 13}
var Py312 = &Version{Major: 3, Minor: 12}
var Py311 = &Version{Major: 3, Minor: 11}
var Py310 = &Version{Major: 3, Minor: 10}
var Py37 = &Version{Major: 3, Minor: 7}

func (p *Version) Compare(other *Version) int {
Expand Down
Loading

0 comments on commit c08b736

Please sign in to comment.