Skip to content

tpbase: cgo-less amd routine decoders#602

Merged
fabled merged 4 commits intoopen-telemetry:mainfrom
grafana:korniltsev/libc_cgoless
Jul 16, 2025
Merged

tpbase: cgo-less amd routine decoders#602
fabled merged 4 commits intoopen-telemetry:mainfrom
grafana:korniltsev/libc_cgoless

Conversation

@korniltsev
Copy link
Copy Markdown
Contributor

This PR is the continuation of #447

Use the new amd.Interpreter instead of cgo decoders in the tpbase package.

@korniltsev korniltsev changed the title tpbase: cgo-less decoders for amd tpbase: cgo-less amd routine decoders Jul 14, 2025
Comment thread tpbase/libc_aarch64.go Fixed
Comment thread tpbase/libc_aarch64.go Fixed
Comment thread tpbase/libc_aarch64.go Fixed
Comment thread tpbase/libc_aarch64.go Fixed
Comment thread tpbase/libc_aarch64.go Fixed
@korniltsev korniltsev marked this pull request as ready for review July 14, 2025 07:46
@korniltsev korniltsev requested review from a team as code owners July 14, 2025 07:46
Comment thread tpbase/libc_aarch64.go Outdated
Copy link
Copy Markdown
Contributor

@fabled fabled left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this! Looks mostly good. Some comments. I realize the codeql seems to be just due to moved code, but perhaps you can fix those while doing this PR?

Comment thread tpbase/tpbase_x86.go Outdated
Comment thread tpbase/tpbase_x86.go Outdated
Comment thread tpbase/tpbase_x86.go Outdated
@korniltsev korniltsev force-pushed the korniltsev/libc_cgoless branch from 3f8fbb2 to db3d452 Compare July 14, 2025 09:21
@korniltsev
Copy link
Copy Markdown
Contributor Author

ok, I will try to handle codeql complains

@korniltsev korniltsev mentioned this pull request Jul 14, 2025
@korniltsev korniltsev force-pushed the korniltsev/libc_cgoless branch 2 times, most recently from 7a4b096 to ee2ca7d Compare July 15, 2025 03:06
@korniltsev korniltsev requested a review from fabled July 15, 2025 03:17
Copy link
Copy Markdown
Member

@christos68k christos68k 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 thread tpbase/assembly_decode_x86.go Outdated
Comment thread tpbase/assembly_decode_x86.go Outdated
Comment on lines +43 to +49
offset := e.NewImmediateCapture("offset")
expected := e.Mem8(
e.Add(
e.MemWithSegment8(x86asm.GS, e.NewImmediateCapture("")),
offset,
),
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Same as the other comment: move offset and expected outside the for block to reduce GC pressure by creating new variable instances for each step. Obviously the actual and Match call cannot move.

But is there any reason why expected definition could not be moved and reused for each step?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah yes, now I understand. will do

@fabled fabled merged commit ba84e25 into open-telemetry:main Jul 16, 2025
27 checks passed
gnurizen pushed a commit to parca-dev/opentelemetry-ebpf-profiler that referenced this pull request Sep 10, 2025
gnurizen pushed a commit to parca-dev/opentelemetry-ebpf-profiler that referenced this pull request Sep 10, 2025
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