Skip to content

Add debug option for flambda2 #1252

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Apr 3, 2023
Merged

Add debug option for flambda2 #1252

merged 4 commits into from
Apr 3, 2023

Conversation

Gbury
Copy link
Contributor

@Gbury Gbury commented Mar 23, 2023

This PR adds a debug option for flambda2. This option can be used either via a CLI flag -flamdba2-debug or via en env variable FLAMBDA2_DEBUG.

Currently, setting this to true only gives unique names to every continuation, which makes it a lot easier to follow what happens to which continuation.

Additionally, Simplify_import now defines the debug () function, that can be used in code to add debugging statements such as if debug () then Format.eprintf ...., which happens quite a lot in my experience.

@mshinwell mshinwell added the flambda2 Prerequisite for, or part of, flambda2 label Mar 24, 2023
@Gbury
Copy link
Contributor Author

Gbury commented Mar 29, 2023

@mshinwell comments have been addressed, this is ready for another review

@Gbury Gbury merged commit 8f37bf3 into ocaml-flambda:main Apr 3, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
flambda2 Prerequisite for, or part of, flambda2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants