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

First version of loop visualization #461

Closed

Conversation

lev-serebryakov-jetbrains
Copy link
Collaborator

This is first, incomplete, version of loop visualization.

Some constructs are not supported (yet).

Main unsupported feature is breaking loop and exiting from the middle of the loop. In simple cases such trace will contain last (incomplete) iteration events out of the loop, and in more complex cases loop is not recognized at all and trace will contain "raw" loop events, like labels and jumps.

Some regenerated presentations contain unprocessed "raw" loop events due to problems described above.

WIP - Without tests and without grouping.
Print simple loops successfully.
Improve loop detection, it supports do { } while()
1. Add tests.
2. Fix empty iterations.

Problems: break out of the loop.
Fix using instrumented code in class loading.
Fix calculations of indents in output.
1. Fix multithreaded loop visualization.
2. Fix single-iteration loop visualization.
Remove all "lonely" (not-referred) labels from trace.
Fix case when there is more than one label action on same level: two loops in a row or lone label before loop.
Fix the case when prefix call depth is not equal to actual call depth.
More fixed of corner cases:

1. Unlink "back branch" events in case when the last event in iteration is deep call.

2. Decrease "prefix depth" for the loop node and iteration node when needed.
Regenerate presentations.

Some new presentations are "bad": contain unprocessed loop events. Work for next version.
Support untaken conditional back branches.
Regenerate presentations after rebase.
@lev-serebryakov-jetbrains lev-serebryakov-jetbrains force-pushed the lev-serebryakov/loops-visualization branch from 75841b6 to 1141230 Compare February 4, 2025 20:07
@ndkoval
Copy link
Collaborator

ndkoval commented Feb 18, 2025

We've decided to proceed on the plugin side

@ndkoval ndkoval closed this Feb 18, 2025
@ndkoval
Copy link
Collaborator

ndkoval commented Feb 18, 2025

@lev-serebryakov-jetbrains, please rename the branch to indicate that it should not be deleted

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