Stream: t-compiler/wg-self-profile

Topic: Easier option to turn on query key recording


Wesley Wiser (Jan 15 2020 at 14:24, on Zulip):

@mw What do you think about making it a bit easier to turn on query key recording for self-profile? We could do something like enable that option if the -Z --verboseis also enabled.

mw (Jan 15 2020 at 15:22, on Zulip):

I'm not particularly fond of the current option either

mw (Jan 15 2020 at 15:24, on Zulip):

I'm not sure if tying to -Zverbose is a good idea though

Wesley Wiser (Jan 15 2020 at 15:24, on Zulip):

-Z self-profile-extended?

Wesley Wiser (Jan 15 2020 at 15:25, on Zulip):

Even -Z self-profile-record-query-keys would be better as I cannot remember how turn it on without looking at the source code

mw (Jan 15 2020 at 15:26, on Zulip):

would an alias help

mw (Jan 15 2020 at 15:26, on Zulip):

/me has to go to the source code in order to come up with example :P

Wesley Wiser (Jan 15 2020 at 15:26, on Zulip):

heh

mw (Jan 15 2020 at 15:27, on Zulip):

-Zself-profile-events=verbose

Wesley Wiser (Jan 15 2020 at 15:27, on Zulip):

I'd be fine with that

mw (Jan 15 2020 at 15:27, on Zulip):

-Zself-profile-events=all would already work

Wesley Wiser (Jan 15 2020 at 15:27, on Zulip):

Oh, I forgot about all

Wesley Wiser (Jan 15 2020 at 15:27, on Zulip):

Although, the cache hit events bloat the output a lot and aren't usually very interesting

mw (Jan 15 2020 at 15:27, on Zulip):

but that would also include everything else

mw (Jan 15 2020 at 15:28, on Zulip):

yes, that

mw (Jan 15 2020 at 15:29, on Zulip):

-Zself-profile-events=default,query-keys would also work?

Wesley Wiser (Jan 15 2020 at 15:29, on Zulip):

Ah, that should work

Wesley Wiser (Jan 15 2020 at 15:29, on Zulip):

It would be nice if there was a shorter option but perhaps just documenting that in -Z help would be enough

Wesley Wiser (Jan 15 2020 at 15:30, on Zulip):

Then I wouldn't have to go look at the source code :laughter_tears:

mw (Jan 15 2020 at 15:30, on Zulip):

yeah, it's definitely annoying

Wesley Wiser (Jan 15 2020 at 15:30, on Zulip):

Just documenting it would be helpful

Wesley Wiser (Jan 15 2020 at 15:31, on Zulip):

I think that's sufficient for now

mw (Jan 15 2020 at 15:31, on Zulip):

I'd be happy to r+ PR that does that

Wesley Wiser (Jan 15 2020 at 15:31, on Zulip):

Ok, I'll do that tonight

mw (Jan 15 2020 at 15:31, on Zulip):

cool

Wesley Wiser (Jan 15 2020 at 15:32, on Zulip):

I've also been thinking it might be nice to a blog post that shows off a complete profiling session and what our tools can do

Wesley Wiser (Jan 15 2020 at 15:32, on Zulip):

This would be a good thing to incorporate in that

Wesley Wiser (Jan 15 2020 at 15:32, on Zulip):

Especially now that the data shows in crox

mw (Jan 15 2020 at 15:33, on Zulip):

how about -Zself-profile-events=crox as alias?

mw (Jan 15 2020 at 15:33, on Zulip):

that _would_ be a nice blog post!

mw (Jan 15 2020 at 15:35, on Zulip):

I'd still like to have a tool like described here at some point: https://internals.rust-lang.org/t/compiler-profiling-survey/10969/18

Wesley Wiser (Jan 15 2020 at 15:36, on Zulip):

Yes!!!

Wesley Wiser (Jan 15 2020 at 15:36, on Zulip):

I think the curses-ui might be the next thing to work on

Wesley Wiser (Jan 15 2020 at 15:37, on Zulip):

Now that we have the query keys, I think summarize should let you drill into a particular query and see all of the invocations with query keys ordered by self-time (or something)

Wesley Wiser (Jan 15 2020 at 15:38, on Zulip):

It would also be nice to just point it at a directory and let it intelligently pick up on the event trace(s) within it

mw (Jan 15 2020 at 15:44, on Zulip):

it might be a good start to collect cases where one thought "I wish it would do that automatically"

Last update: Feb 25 2020 at 04:25UTC