Skip to content

Conversation

@elsakeirouz
Copy link

No description provided.

nsavoire and others added 10 commits November 19, 2024 18:43
When uploading elf symbols, it is sometimes necessary to open a file
other than the reported executalle (eg. to look for separate debug
information).
Starting with Python 3.12, PyGILState_GetThisThreadState calls PyThread_tss_is_created
first before calling PyThread_tss_get.
On default builds of python (without `--enable-optimizations`, `--with-lto`), the calls
to PyThread_tss_is_created and PyThread_tss_get are not inlined, so the value of autoTLSKey
is stored in a register before being passed to both function calls. This causes the decode
disassembler to not find the value in the call instruction.
To work around this, we look into PyGILState_Release which as of Python 3.13,
calls PyThread_tss_get directly.
* support/.gitignore
* support/ebpf/tracer.ebpf.debug.amd64
* support/ebpf/tracer.ebpf.debug.arm64
This change makes systemProcess.Open return `/proc/<profiler_pid>/fd/<elf_fd>`
as actual path instead of `/proc/<process_pid>/map_files/<mapping>`.
The upside of this change is that the new path remains valid even after the
target process has been terminated, while the old path becomes invalid.
* fix: apply patch for nodejs on arm

* interpreter/nodev8/v8.go
* tracer/types/parse.go
* tracer/types/parse_test.go

* fix: correctly calculate sp for JSEntry Frame layout

Starting v8 8.0.13, the JSEntry frame layout was updated
to accomodate unwinding on Windows ARM64. The changes made
on this PR take into account the stack size for this frame,
which is 160 instead of 16 as multiple callee-saved registers
are pushed onto it before fp and lr.

The fix only works starting v8 9.0.17: the JSEntry frame
layout was updated again to include a valid saved frame pointer.
Prior, the frame pointer (x29) did not point to the previous
{x29, x30} pair on the stack, thus not conforming to the Windows
ARM64 ABI Conventions [1].

[1] https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-160#stack-walking

* interpreter/nodev8/v8.go
* support/ebpf/tracer.ebpf.debug.amd64
* support/ebpf/tracer.ebpf.debug.arm64
* support/ebpf/tracer.ebpf.release.arm64
* support/ebpf/v8_tracer.ebpf.c
@elsakeirouz elsakeirouz self-assigned this Apr 7, 2025
@elsakeirouz elsakeirouz force-pushed the elsa/trace-to-profile-corr branch 4 times, most recently from ce5f1f8 to 6e4e924 Compare April 7, 2025 11:10
@elsakeirouz
Copy link
Author

All that is left to do is fix the lint tests which are failing due to lines that are too long.

@elsakeirouz elsakeirouz force-pushed the elsa/trace-to-profile-corr branch 7 times, most recently from c0b55be to d87d45a Compare April 11, 2025 14:19
Gandem and others added 3 commits April 16, 2025 16:54
* host/host.go
* interpreter/apmint/apmint.go
* processmanager/manager.go
* reporter/iface.go
* support/ebpf/tracer.ebpf.debug.amd64
* support/ebpf/tracer.ebpf.release.amd64
* support/ebpf/types.h
* tracehandler/tracehandler.go
* tracer/tracer.go
* host/host.go
* interpreter/apmint/apmint.go
* reporter/iface.go
* support/ebpf/interpreter_dispatcher.ebpf.c
* support/ebpf/tracer.ebpf.debug.amd64
* support/ebpf/tracer.ebpf.release.amd64
* support/ebpf/types.h
* tracehandler/tracehandler.go
* tracer/tracer.go
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.

4 participants