Skip to content
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

logpipe: allow log_pipe_queue() to be tail-call-optimized #426

Merged

Conversation

bazsi
Copy link
Member

@bazsi bazsi commented Dec 28, 2024

This patch refactors log_pipe_queue() to allow tail-call-optimization, meaning gcc uses a jmp to "call" the next queue method instead of a call, thereby eliminating the stack frame of log_pipe_queue().

This means that stacktraces are shorter when measuring them with perf and may also improve a bit of performance, although it was 2-3% in my measurements, which could easily be attributed to jitter.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
@OverOrion OverOrion self-requested a review January 2, 2025 09:31
@OverOrion OverOrion merged commit 1a76519 into axoflow:main Jan 2, 2025
22 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.

2 participants