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

Support a TUI "live view" version of -Z self-profile. #53630

Open
eddyb opened this issue Aug 23, 2018 · 5 comments
Open

Support a TUI "live view" version of -Z self-profile. #53630

eddyb opened this issue Aug 23, 2018 · 5 comments
Labels
A-self-profile Area: Self-profiling feature of the compiler C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Aug 23, 2018

Using tui and by passing, say, the entire query stack to an "UI" thread 60 times per second, we can provide both a live view of the query stack, including when each entry started, and overall stats.

cc @nikomatsakis @michaelwoerister @wesleywiser @solson

@retep998
Copy link
Member

But would it work on Windows?

@nagisa
Copy link
Member

nagisa commented Aug 23, 2018

My personal preference is that we output some sort of file that can be inspected with some external tool instead (either live or after-the-fact). This generally allows way more control and significantly greater insight into operation of the code.

This is fairly popular in embedded and works extremely well. Not sure if there’s a generic libre tool for this, though, but I had a fair amount of success producing similar graphs out of perf record output.

@wesleywiser
Copy link
Member

FYI, passing -Zprofile-json causes a self_profiler_results.json file to be created in the working directory with all of the same info presented in the -Zself-profile option.

@eddyb
Copy link
Member Author

eddyb commented Aug 23, 2018

@wesleywiser Can you mention that in #53631 as well?

For the record, this issue is about an user-friendly live view that can give you "a feel" for what the compiler is doing, at an insignificant cost (i.e. without recording every single relevant event).
We can do multiple things here, but among them I also want this.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 27, 2019
@jonas-schievink jonas-schievink added the A-self-profile Area: Self-profiling feature of the compiler label Apr 18, 2020
@eddyb
Copy link
Member Author

eddyb commented Oct 27, 2020

Potentially relevant now that we've moved to tracing: tokio-rs/tracing#884 (learned of it thanks to @hawkw, who mentioned it in a related discussion about interactive log viewers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-self-profile Area: Self-profiling feature of the compiler C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants