Skip to content

improve dbg intrinsic with fflush #7126

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 5 commits into from
Apr 30, 2025
Merged

improve dbg intrinsic with fflush #7126

merged 5 commits into from
Apr 30, 2025

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Apr 28, 2025

Description

This PR brings a new syscall "fflush" to help EcalHandler know when the __dbg is finished and they flush their buffers.

In theory, Linux fflush is not a syscall because it just flushes "user-space" buffers. As we do not have this difference, we are still going to call fflush as a syscall.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@xunilrj xunilrj self-assigned this Apr 28, 2025
@xunilrj xunilrj requested review from a team as code owners April 28, 2025 22:56
Copy link

codspeed-hq bot commented Apr 28, 2025

CodSpeed Performance Report

Merging #7126 will not alter performance

Comparing xunilrj/dbg-fflush (6908f91) with master (d258921)

Summary

✅ 22 untouched benchmarks

@tritao
Copy link
Contributor

tritao commented Apr 29, 2025

Can you maybe explain the rationale for this? Is there a reason the output cannot be flushed as it arrives? Maybe due to performance reasons on the consumer side?

@xunilrj
Copy link
Contributor Author

xunilrj commented Apr 29, 2025

It can. The hardest part is to know when '__dbg' stops printing.

This will allow 'EcalHandlers' to print the whole thing as just one string when needed.

@tritao tritao enabled auto-merge (squash) April 29, 2025 23:09
@tritao tritao temporarily deployed to fuel-sway-bot April 29, 2025 23:09 — with GitHub Actions Inactive
@kayagokalp kayagokalp requested a review from a team as a code owner April 30, 2025 03:30
@tritao tritao merged commit 42321ef into master Apr 30, 2025
41 checks passed
@tritao tritao deleted the xunilrj/dbg-fflush branch April 30, 2025 14:31
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.

5 participants