Skip to content

Conversation

@ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Nov 5, 2025

This PR removes a bunch of interfaces we've marked as deprecated over the years, but never followed through on removing them. All of these are at least a few releases old, some dating back to 0.9.0. This should've given users ample time to migrate.

The addition of alternative, improved APIs are typically what causes deprecation notices to be given, so there should be a clear path forward for all things removed here.

@ti-mo ti-mo requested review from a team, mmat11 and rgo3 as code owners November 5, 2025 15:16
@ti-mo ti-mo requested a review from lmb November 5, 2025 15:16
@github-actions github-actions bot added the breaking-change Changes exported API label Nov 5, 2025
rgo3
rgo3 previously approved these changes Nov 5, 2025
Copy link
Contributor

@rgo3 rgo3 left a comment

Choose a reason for hiding this comment

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

Was the retry logic always only intended for the SIGPROF case? Masking SIGPROF has been around for a while, wondering why we only remove the retry logic now?

Other deprecations LGTM!

Giga nit: There's a small typo in that last commit message, s/endlessely/endlessly

@lmb
Copy link
Collaborator

lmb commented Nov 6, 2025

Was the retry logic always only intended for the SIGPROF case?

I think it also applies in the case of asynchronous preemption, which uses signals on Linux. Might have to double check whether that has special casing for threads in a syscall to not signal them (aka those are considered preempted).

I would remove reset but keep the retry behaviour unchanged. I’ve got a branch which does that, I should probably dust it off.

More generally, EINTR means try this operation again. Signals used to kill a process won’t return EINTR. So it’s not a clear cut thing to say that EINTR should be returned. The fact that nobody has complained so far tells me that the current code is at least not detrimental. Or that not many people benchmark programs like this (I found very few callers in open source software).

florianl added a commit to open-telemetry/opentelemetry-ebpf-profiler that referenced this pull request Nov 18, 2025
As the function RewriteMaps will be removed upstream (see cilium/ebpf#1894 (comment)), move the code here.

Fixes #954

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
CollectionOptions.MapReplacements has been available since 0.9.0. Now's the
time to sunset this API.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This has been deprecated since v0.17.0. Use CollectionSpec.Variables instead.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This was replaced by NewFromFD in v0.14.0.

Signed-off-by: Timo Beckers <timo@isovalent.com>
"Deprecated:" is an official convention recognized by Go's tooling
(https://go.dev/wiki/Deprecated) and causes fields to be struck through
in some editors. We shouldn't mark things deprecated unless we have the
intention of removing them, which is not the case here.

Changed the docstring to point users to the recommended alternative: fexit.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This was renamed and deprecated in v0.9.0.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This was deprecated in 0.9.0. Use errors.Is(err, asm.ErrUnreferencedSymbol)
instead.

Signed-off-by: Timo Beckers <timo@isovalent.com>
These were replaced by AssociateMap in v0.9.0.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This was replaced by Instruction.WithSymbol in v0.9.0 and has been deprecated
since.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This was replaced by Instruction.Map in v0.9.0 and deprecated since.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo
Copy link
Collaborator Author

ti-mo commented Nov 24, 2025

@lmb I've gone ahead and backed out of the Reset() removal entirely. Let's go ahead with converting Program.Benchmark() to take a testing.B instead, since it feels pointless to break API twice if we're planning on doing that anyway. When we make this conversion, we can hide Reset() from the caller and report our own metric, e.g. retries to both make sure retries don't go unnoticed and don't need to be handled explicitly by the user.

Then the retries argument also becomes unnecessary as we can take b.N as the value to RunOptions.Repeat.

@ti-mo ti-mo changed the title Deprecate All The Things, remove retry on EINTR in Program.{Test,Run,Benchmark} Deprecate All The Things Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Changes exported API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants