Skip to content

print: try harder to ensure DbgScope parents come before their children. #19

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 1 commit into from
Jul 1, 2025

Conversation

eddyb
Copy link
Collaborator

@eddyb eddyb commented Jul 1, 2025

Follow-up to:

Overlooked an edge case (scope.parent() being in the claimed map, but at a later position than scope itself, i.e. part of the same "claim" batch) in the original PR, now the order is properly "outside-in":

Before After
image image

@eddyb eddyb requested a review from a team July 1, 2025 17:42
Copy link
Member

@Firestar99 Firestar99 left a comment

Choose a reason for hiding this comment

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

I honestly don't fully know what the difference between the screenshots are. Just some lines changed :D

@eddyb eddyb added this pull request to the merge queue Jul 1, 2025
Merged via the queue into Rust-GPU:main with commit c7a9f61 Jul 1, 2025
6 checks passed
@eddyb eddyb deleted the print-dbg-scope-late-parent branch July 1, 2025 17:58
@eddyb
Copy link
Collaborator Author

eddyb commented Jul 1, 2025

I honestly don't fully know what the difference between the screenshots are

Thanks to the context for each // d123 = ... being printed on the line just before it (think the reverse of a backtrace, so something like main always being first, and going down towards leaf functions), this fix means the d numbers appear monotonically, in a big block like that - more generally, def-before-use should be enforced.

When using the HTML directly (which I should start linking again, if only these files weren't so huge), the effect is that now clicking through these d123 references always brings up "up"/earlier (to smaller numbers, e.g. d123 -> d100 -> d99 -> d20 -> d5 -> d0, for a 6-deep nesting of inlined functions).

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