php: cgo-less amd routine decoders#604
Merged
christos68k merged 3 commits intoopen-telemetry:mainfrom Jul 14, 2025
Merged
Conversation
florianl
approved these changes
Jul 14, 2025
christos68k
approved these changes
Jul 14, 2025
| "golang.org/x/arch/x86/x86asm" | ||
| ) | ||
|
|
||
| // retrieveZendVMKindX86. This function reads the code blob and recovers |
Member
There was a problem hiding this comment.
Suggested change
| // retrieveZendVMKindX86. This function reads the code blob and recovers | |
| // retrieveZendVMKindX86 reads the code blob and recovers |
| if res.Match(imm) { | ||
| return uint(imm.CapturedValue()), nil | ||
| } | ||
| return 0, errors.New("failed to decode zend_vm_kind: target not found") |
Member
There was a problem hiding this comment.
Nit: We can turn this error into a global variable
Suggested change
| return 0, errors.New("failed to decode zend_vm_kind: target not found") | |
| return 0, errors.New("failed to decode zend_vm_kind: target not found") |
Contributor
Author
There was a problem hiding this comment.
these 3 errors are different cause include the function name in it.
| return libpf.SymbolValue(imm.CapturedValue()), nil | ||
| } | ||
| return libpf.SymbolValueInvalid, | ||
| fmt.Errorf("failed to decode execute_ex: %s", "target not found") |
Member
There was a problem hiding this comment.
No need to use a format string here, also we can turn this error into a global var
Suggested change
| fmt.Errorf("failed to decode execute_ex: %s", "target not found") | |
| fmt.Errorf("failed to decode execute_ex: %s", "target not found") |
Contributor
Author
There was a problem hiding this comment.
removed format string, kept a local errors.New
| return rdiValue, rsiValue, nil | ||
| } | ||
| return libpf.SymbolValueInvalid, libpf.SymbolValueInvalid, | ||
| fmt.Errorf("failed to recover jit buffer: %s", "target not found") |
Member
There was a problem hiding this comment.
No need to use a format string here, we can turn this error into a global var
Contributor
Author
There was a problem hiding this comment.
removed format string, kept a local errors.New
4fbe2cc to
18095be
Compare
This was referenced Aug 14, 2025
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 8, 2025
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 8, 2025
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 9, 2025
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the continuation of #447
Use the new
amd.Interpreterinstead of cgo decoders in thephppackage.