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

cgirgen: instrument with frameMsg #1399

Merged

Conversation

zerbina
Copy link
Collaborator

@zerbina zerbina commented Aug 6, 2024

Summary

Instrument cgirgen with stack-frame annotations in order to aid
debugging with nim_dbg.

Details

  • to keep overhead reasonably low, only the exprToIr and stmtToIr
    procedures are instrumented
  • debugutils.frameMsg is generalized to accept a TLineInfo; the
    callsites are adjusted accordingly

It now accepts a `TLineInfo`, making it usable more broadly. The
callsites are adjusted accordingly.
To keep the overhead at a reasonable level, only the top-level
procedures `stmtToIr` and `exprToIr` are instrumented.
@zerbina zerbina added compiler General compiler tag compiler/backend Related to backend system of the compiler labels Aug 6, 2024
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

Nice, working with info directly seems better overall.

@saem
Copy link
Collaborator

saem commented Aug 6, 2024

/merge

Copy link

github-actions bot commented Aug 6, 2024

Merge requested by: @saem

Contents after the first section break of the PR description has been removed and preserved below:


@chore-runner chore-runner bot added this pull request to the merge queue Aug 6, 2024
Merged via the queue into nim-works:devel with commit 39660ca Aug 6, 2024
31 checks passed
@zerbina zerbina deleted the instrument-cgirgen-with-frameMsg branch August 13, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/backend Related to backend system of the compiler compiler General compiler tag
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants