Skip to content

tpbase: cgo-less amd routine decoders #602

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 4 commits into from
Jul 16, 2025

Conversation

korniltsev
Copy link
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
@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
Copy link
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?

@korniltsev korniltsev force-pushed the korniltsev/libc_cgoless branch from 3f8fbb2 to db3d452 Compare July 14, 2025 09:21
@korniltsev
Copy link
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
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 on lines 43 to 49
offset := e.NewImmediateCapture("offset")
expected := e.Mem8(
e.Add(
e.MemWithSegment8(x86asm.GS, e.NewImmediateCapture("")),
offset,
),
)
Copy link
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
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
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.

3 participants