Skip to content

[Outlining] Improve logging #7464

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

[Outlining] Improve logging #7464

merged 7 commits into from
Apr 9, 2025

Conversation

ashleynh
Copy link
Collaborator

@ashleynh ashleynh commented Apr 7, 2025

Improve the quality of debug logs during outlining by:

  • reorder logs to occur before corresponding asserts
  • rename the debug logging macro used in Outlining.cpp so its not defined twice
  • add a parameter to function outline to thread the data needed for logging
  • add a parameters to struct OutliningSequence to connect the sequence back to its location in the stringified binary

@ashleynh ashleynh marked this pull request as draft April 7, 2025 22:32
@ashleynh ashleynh changed the title logging [Outlining] Improved logging Apr 7, 2025
@ashleynh ashleynh changed the title [Outlining] Improved logging [Outlining] Improve logging Apr 7, 2025
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

Looks good, but it would be good to put #if OUTLINING_DEBUG around the new member variables and outline parameter.

@ashleynh ashleynh marked this pull request as ready for review April 7, 2025 23:17
Comment on lines 415 to 416
stringify.exprs[seqIdx + substring.Length - 1]->type ==
Type::unreachable,
Copy link
Member

Choose a reason for hiding this comment

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

The duplication here creates risk that these non-trivial arguments get out of sync in the debug and non-debug versions. Can you either create a separate variable for them or restrict the scope of the ifdef?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay i restricted the scope.

@ashleynh ashleynh merged commit deb404c into main Apr 9, 2025
14 checks passed
@ashleynh ashleynh deleted the logging branch April 9, 2025 18:53
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.

None yet

2 participants