Stream: t-compiler/wg-nll

Topic: weekly meeting June 5


pnkfelix (Jun 05 2018 at 19:32, on Zulip):

hi all

pnkfelix (Jun 05 2018 at 19:32, on Zulip):

or rather

nikomatsakis (Jun 05 2018 at 19:32, on Zulip):

o/

pnkfelix (Jun 05 2018 at 19:32, on Zulip):

hi @all

Santiago Pastorino (Jun 05 2018 at 19:32, on Zulip):

\o

Matthew Jasper (Jun 05 2018 at 19:32, on Zulip):

\o

davidtwco (Jun 05 2018 at 19:33, on Zulip):

o/

pnkfelix (Jun 05 2018 at 19:33, on Zulip):

so here's the paper doc for the meeting, as usual: https://paper.dropbox.com/doc/Non-lexical-lifetimes-NLL-Triage-Em2cJrvxQMMFWLE7lE5Be#

pnkfelix (Jun 05 2018 at 19:33, on Zulip):

Feel free to add any status updates to the first section

Keith Yeung (Jun 05 2018 at 19:34, on Zulip):

o/

pnkfelix (Jun 05 2018 at 19:34, on Zulip):

I'll call particular attention to this addition to the "NLL stderr diagnostic devations" paper doc: https://paper.dropbox.com/doc/NLL-stderr-diagnostic-deviations-KzroSvNgQ7lip3WQyiLTa#:uid=647910423141116858401682&h2=Github-Issues-filed-for-distin

pnkfelix (Jun 05 2018 at 19:34, on Zulip):

namely, its a second table that is like an inverse of the first

pnkfelix (Jun 05 2018 at 19:35, on Zulip):

its meant to help us actually attack the issues that the tests identified

pnkfelix (Jun 05 2018 at 19:37, on Zulip):

(I put that "Last Known Investigators" column in there as a way for people to say "Hmm I wonder what the status is on this" or even "I wonder if I could help with this", and then they'd know maybe who to ping about it.)

pnkfelix (Jun 05 2018 at 19:37, on Zulip):

So, having said all that

pnkfelix (Jun 05 2018 at 19:37, on Zulip):

Our priorities for this week

nikomatsakis (Jun 05 2018 at 19:37, on Zulip):

so things that are all blank there are basically ... nobody has looked at it yet?

pnkfelix (Jun 05 2018 at 19:37, on Zulip):

@nikomatsakis I think so. there may be a few cases where I missed that someone had looked at it

nikomatsakis (Jun 05 2018 at 19:38, on Zulip):

ok

pnkfelix (Jun 05 2018 at 19:38, on Zulip):

they aren't all of equal importance, too

Santiago Pastorino (Jun 05 2018 at 19:38, on Zulip):

I was supposed to start with https://github.com/rust-lang/rust/issues/51195

Santiago Pastorino (Jun 05 2018 at 19:38, on Zulip):

I can assign that to myself on github

Santiago Pastorino (Jun 05 2018 at 19:38, on Zulip):

unless @nikomatsakis wants me to jump on something else

pnkfelix (Jun 05 2018 at 19:38, on Zulip):

yeah and I think someone also had been looking at https://github.com/rust-lang/rust/issues/51000

pnkfelix (Jun 05 2018 at 19:39, on Zulip):

so there are some omissions

nikomatsakis (Jun 05 2018 at 19:39, on Zulip):

I think @Santiago Pastorino that issue is as good as any other — are you still doing the profiling bulds?

Santiago Pastorino (Jun 05 2018 at 19:39, on Zulip):

we were working with Niko on that one

pnkfelix (Jun 05 2018 at 19:39, on Zulip):

Look at it this way: If you poked at a bug and think you could help someone with it

pnkfelix (Jun 05 2018 at 19:39, on Zulip):

then please do add yourself to the appropriate cell in that column. :)

Santiago Pastorino (Jun 05 2018 at 19:39, on Zulip):

I think @Santiago Pastorino that issue is as good as any other — are you still doing the profiling bulds?

this thing is still building :(

Santiago Pastorino (Jun 05 2018 at 19:40, on Zulip):

@pnkfelix in case it was not clear #51000 is the one we were working with Niko

nikomatsakis (Jun 05 2018 at 19:41, on Zulip):

I feel like #51000 may be a "meh" case

Santiago Pastorino (Jun 05 2018 at 19:41, on Zulip):

I remember @nikomatsakis said it will need a "major" refactor

nikomatsakis (Jun 05 2018 at 19:41, on Zulip):

what makes it "MY EYES" is the multi-line span

pnkfelix (Jun 05 2018 at 19:41, on Zulip):

So, diagnostics are definitely a big task, and an important one since Niko and I are now on the same page that when we deploy NLL, its going to be using the diagnostics that we are fixing now

nikomatsakis (Jun 05 2018 at 19:41, on Zulip):

but that is only there because the test is artificial

nikomatsakis (Jun 05 2018 at 19:41, on Zulip):

I think that the fix is probably to make Place carry a span, and to convert MIR borrowck to use something else

pnkfelix (Jun 05 2018 at 19:41, on Zulip):

(i.e. in that discussion we had a week ago, we now agree that if we can do it, we want to set things up so that the end users will only see the error messages that we are working on right now.)

pnkfelix (Jun 05 2018 at 19:42, on Zulip):

But having said all that

pnkfelix (Jun 05 2018 at 19:42, on Zulip):

I actually would like @nikomatsakis to say something about performance investigation

pnkfelix (Jun 05 2018 at 19:42, on Zulip):

because that's also super important, perhaps even more importnaat now

pnkfelix (Jun 05 2018 at 19:43, on Zulip):

because (I think) we might have diagnostics sort of under control (or at least on a trajectory to be under control)

pnkfelix (Jun 05 2018 at 19:43, on Zulip):

but I don't know if performance has that same trajectory right now

nikomatsakis (Jun 05 2018 at 19:43, on Zulip):

ok well you can take a look at the profiling here

nikomatsakis (Jun 05 2018 at 19:44, on Zulip):

that is for clap-rs

nikomatsakis (Jun 05 2018 at 19:44, on Zulip):

obviously the heavy weight thing there is type-checking

nikomatsakis (Jun 05 2018 at 19:44, on Zulip):

I spent a while digging into that and I believe there is room for substantial improvement

nikomatsakis (Jun 05 2018 at 19:44, on Zulip):

but it's a non-trivial refactoring

nikomatsakis (Jun 05 2018 at 19:45, on Zulip):

in short, looking at the actual operations that the type-check does, I found that if we were to canonicalize and query-ify them, we would only have to do about 6% of what we are doing now

nikomatsakis (Jun 05 2018 at 19:45, on Zulip):

that said, it's not obvious that this will translate to 6% of the time we are spending

nikomatsakis (Jun 05 2018 at 19:45, on Zulip):

but it's a good lead anyway and it's what I've been working towards

nikomatsakis (Jun 05 2018 at 19:45, on Zulip):

I sort of estimate that if I keep devoting a lot of time into it, coudl have it done by next week

nikomatsakis (Jun 05 2018 at 19:46, on Zulip):

the other things in the profile are smaller, but still significant

pnkfelix (Jun 05 2018 at 19:46, on Zulip):

okay

pnkfelix (Jun 05 2018 at 19:46, on Zulip):

what is the "this" after DataFlowResultsConsumer::analyze_results (7% ?

nikomatsakis (Jun 05 2018 at 19:46, on Zulip):

er that was a mistake

nikomatsakis (Jun 05 2018 at 19:46, on Zulip):

I originally wrote "why is this so slow"

pnkfelix (Jun 05 2018 at 19:46, on Zulip):

okay

nikomatsakis (Jun 05 2018 at 19:46, on Zulip):

but I added a bit more detail below :)

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

it still seems to me that 7% of total execution time

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

should not be spent walking those results

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

granted, cargo check :)

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

but for comparison

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

the entire AST-based borrowck

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

executes in 2% of total execution time

nikomatsakis (Jun 05 2018 at 19:47, on Zulip):

and it does all this same work

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

well, not entirely fair, I guess MIR is desugared and has "Extra stuff "

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

but point stands :)

pnkfelix (Jun 05 2018 at 19:48, on Zulip):

the visit_mir calls

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

the obvious big gorilla in that 7% is access_place

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

the visit_mir calls

I have no idea what those are

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

I can't figure it out

pnkfelix (Jun 05 2018 at 19:48, on Zulip):

those are isolated to just the ones during MIR-borrowck ?

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

yes, and even more than that

pnkfelix (Jun 05 2018 at 19:48, on Zulip):

or are they all the visit_mir calls during the whole compile?

nikomatsakis (Jun 05 2018 at 19:48, on Zulip):

they are direct calls from do_mir_borrowck

pnkfelix (Jun 05 2018 at 19:49, on Zulip):

hmm

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

no, all of this is contextual to mir-borrowck

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

but I can't find any such calls

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

I added #[inline(never)] because sometimes that creates direct calls

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

where none existed

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

so I added it in various places

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

and I still can't find it

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

so I am kind of confused

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

it might be that the DWARF info is a bit messed up?

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

the next step is to add in -Ztime-passes style instrumentation I guess

nikomatsakis (Jun 05 2018 at 19:49, on Zulip):

and try to correlate it

pnkfelix (Jun 05 2018 at 19:50, on Zulip):

MoveData::gather_moves maybe ...

nikomatsakis (Jun 05 2018 at 19:50, on Zulip):

well, I added #[inline(never)] to that

pnkfelix (Jun 05 2018 at 19:50, on Zulip):

and then there's nll::replace_regions_in_mir

nikomatsakis (Jun 05 2018 at 19:50, on Zulip):

that one too

nikomatsakis (Jun 05 2018 at 19:50, on Zulip):

both of them are present in the profile, but very small

nikomatsakis (Jun 05 2018 at 19:50, on Zulip):

0% in both cases

pnkfelix (Jun 05 2018 at 19:50, on Zulip):

hmm okay so you already made them be out-of-line ?

nikomatsakis (Jun 05 2018 at 19:50, on Zulip):

yes

pnkfelix (Jun 05 2018 at 19:50, on Zulip):

weird weird wierd

pnkfelix (Jun 05 2018 at 19:51, on Zulip):

clearly the answer is

davidtwco (Jun 05 2018 at 19:51, on Zulip):

What if you added a panic/bug at the top of the function then checked the backtrace? Not sure if that is a sensible suggestion.

lqd (Jun 05 2018 at 19:51, on Zulip):

do we know how to / could we prototype a do_dataflow replacement in polonius ?

pnkfelix (Jun 05 2018 at 19:51, on Zulip):

to cut-and-paste the method N tims

pnkfelix (Jun 05 2018 at 19:51, on Zulip):

:)

nikomatsakis (Jun 05 2018 at 19:51, on Zulip):

this is my diff: https://gist.github.com/5607f3ce59fde68aae098cb1b45c216d

nikomatsakis (Jun 05 2018 at 19:51, on Zulip):

@David Wood the problem is that visit_mir is called from many places

nikomatsakis (Jun 05 2018 at 19:51, on Zulip):

also, these hits are coming directly from visit_mir

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

not from some callee of it

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

it itself is (I think) a generic fn

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

I kinda think think the profile data is wonky somehow

davidtwco (Jun 05 2018 at 19:52, on Zulip):

Ah, I figured that if it was called directly from do_mir_borrowck then you'd see that failure first.

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

oh, but I think it gets called before we get to MIR borrowck

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

I guess we could set some flag

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

and start ruling out known sources

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

seems like a good task for somebody :)

nikomatsakis (Jun 05 2018 at 19:52, on Zulip):

I can try doing it on the side, but I'm juggling already a few things...

davidtwco (Jun 05 2018 at 19:52, on Zulip):

I can take a look.

pnkfelix (Jun 05 2018 at 19:53, on Zulip):

This may seem obvious, but: make sure you can replicate the performance numbers first

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

do we know how to / could we prototype a do_dataflow replacement in polonius ?

I haven't really thought hard about that @lqd

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

This may seem obvious, but: make sure you can replicate the performance numbers first

I guess that was directed at @David Wood ?

pnkfelix (Jun 05 2018 at 19:53, on Zulip):

No point in investigating if you don't see the evidence from the outset

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

in which case, I definitely agree

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

actualy

pnkfelix (Jun 05 2018 at 19:53, on Zulip):

Yes that was directed at @David Wood

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

another good idae which I've not tried

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

is to run this with cachegrind

nikomatsakis (Jun 05 2018 at 19:53, on Zulip):

or whatever that tool is called

pnkfelix (Jun 05 2018 at 19:54, on Zulip):

so slow...

nikomatsakis (Jun 05 2018 at 19:54, on Zulip):

not cachegrind really

lqd (Jun 05 2018 at 19:54, on Zulip):

do_dataflow's 2% is not that significant compared to the rest

nikomatsakis (Jun 05 2018 at 19:54, on Zulip):

@lqd yeah I think it's prob not worth it just now

davidtwco (Jun 05 2018 at 19:54, on Zulip):

Replicating the performance numbers would be profiling clap-rs?

nikomatsakis (Jun 05 2018 at 19:55, on Zulip):

Callgrind

nikomatsakis (Jun 05 2018 at 19:55, on Zulip):

that's the one I meant

nikomatsakis (Jun 05 2018 at 19:55, on Zulip):

yeah, if you gather some perf stats

nikomatsakis (Jun 05 2018 at 19:55, on Zulip):

we can check if you see the same data :)

pnkfelix (Jun 05 2018 at 19:55, on Zulip):

@David Wood yes, profile clap-rs and make sure you observe similar issues

nikomatsakis (Jun 05 2018 at 19:55, on Zulip):

I can start a callgrind run going anyway

nikomatsakis (Jun 05 2018 at 19:55, on Zulip):

it takes a while, but that's ok, I got other stuff to do

lqd (Jun 05 2018 at 19:56, on Zulip):

I assume we can't use chalk's SLG solver for the "internal type-check" ?

nikomatsakis (Jun 05 2018 at 19:56, on Zulip):

is anybody interested in trying to optimize access_place ?

pnkfelix (Jun 05 2018 at 19:56, on Zulip):

Well, wait

pnkfelix (Jun 05 2018 at 19:56, on Zulip):

before that

nikomatsakis (Jun 05 2018 at 19:56, on Zulip):

@lqd nope :) anyway I doubt it would be faster yet, it's never been optimized

nikomatsakis (Jun 05 2018 at 19:56, on Zulip):

before that

ok

pnkfelix (Jun 05 2018 at 19:57, on Zulip):

does anyone want to volunteer to look at why inflate is so slow?

pnkfelix (Jun 05 2018 at 19:57, on Zulip):

(unless I missed that task being taken already?)

nikomatsakis (Jun 05 2018 at 19:57, on Zulip):

ok, before that, let's make a list I guess?

pnkfelix (Jun 05 2018 at 19:57, on Zulip):

Ha ha

Santiago Pastorino (Jun 05 2018 at 19:57, on Zulip):

hahaha

Santiago Pastorino (Jun 05 2018 at 19:57, on Zulip):

@nikomatsakis count with me on what you need

lqd (Jun 05 2018 at 19:57, on Zulip):

damn :)

Santiago Pastorino (Jun 05 2018 at 19:58, on Zulip):

if the diagnostic issue is less important ... of course :)

Santiago Pastorino (Jun 05 2018 at 19:58, on Zulip):

but I can jump in any of those if you want

nikomatsakis (Jun 05 2018 at 19:58, on Zulip):

I guess that list is complete?

pnkfelix (Jun 05 2018 at 19:58, on Zulip):

yes okay

nikomatsakis (Jun 05 2018 at 19:58, on Zulip):
- profile the inflate case that is 1000% slower on the NLL dashboard
- investigate optimizing `access_place`
- reproduce and try to diagnose the mystery `visit_mir` case
pnkfelix (Jun 05 2018 at 19:58, on Zulip):

i think so

nikomatsakis (Jun 05 2018 at 19:59, on Zulip):

we might be able to optimize do_dataflow and eke out a few percent, but I think that energy is better spent on diagnostics

pnkfelix (Jun 05 2018 at 19:59, on Zulip):

I'm willing to take on rust-lang/rust#51372 if no one else wants it

davidtwco (Jun 05 2018 at 20:00, on Zulip):

(unrelated: we really do need to set up the GitHub linking bot for Zulip)

nikomatsakis (Jun 05 2018 at 20:01, on Zulip):

(oh, I forgot about that)

nikomatsakis (Jun 05 2018 at 20:01, on Zulip):

(but man I do find the GH linking on Discord etc annoying, I wonder if the Zulip one is as intrusive)

pnkfelix (Jun 05 2018 at 20:01, on Zulip):

What system is better: To have people write their names next to items, or to have a mapping from name to item (like I started at the bottom)

nikomatsakis (Jun 05 2018 at 20:02, on Zulip):

I think name next to item?

nikomatsakis (Jun 05 2018 at 20:02, on Zulip):

at least it's more obvious what is not claimed

pnkfelix (Jun 05 2018 at 20:02, on Zulip):

kay

pnkfelix (Jun 05 2018 at 20:03, on Zulip):

for open-ended things like diagnostics

pnkfelix (Jun 05 2018 at 20:03, on Zulip):

I guess we can have multiple names

nikomatsakis (Jun 05 2018 at 20:03, on Zulip):

yeah, or people can add the issues they have in mind...

nikomatsakis (Jun 05 2018 at 20:04, on Zulip):

I guess that @Santiago Pastorino, if they are able to get perf up and going, would also be able to confirm the mystery visit_mir results

Santiago Pastorino (Jun 05 2018 at 20:04, on Zulip):

yes

nikomatsakis (Jun 05 2018 at 20:04, on Zulip):

should we put you down @Santiago Pastorino to profile and investigate inflate?

nikomatsakis (Jun 05 2018 at 20:04, on Zulip):

since you have that in progress

Santiago Pastorino (Jun 05 2018 at 20:04, on Zulip):

:+1:

nikomatsakis (Jun 05 2018 at 20:05, on Zulip):

I guess we should tlak about diagnostics?

Santiago Pastorino (Jun 05 2018 at 20:05, on Zulip):

:+1:

Santiago Pastorino (Jun 05 2018 at 20:05, on Zulip):

:)

nikomatsakis (Jun 05 2018 at 20:05, on Zulip):

we're sort of out of time, the main thing I wanted to say is that I have been poking at the region errors; @David Wood might try to do a pairing session to follow up on that, if they can stay awake that late

nikomatsakis (Jun 05 2018 at 20:05, on Zulip):

/me goes to bed at 8pm

nikomatsakis (Jun 05 2018 at 20:05, on Zulip):

don't know how you people do that ;)

pnkfelix (Jun 05 2018 at 20:05, on Zulip):

(and then niko gets up at 4am)

pnkfelix (Jun 05 2018 at 20:05, on Zulip):

(he likes to leave out that detail)

nikomatsakis (Jun 05 2018 at 20:06, on Zulip):

actually, I've been shifted later, more like 9pm-5am. Taking too damn long to clean up the kitchen these days.

davidtwco (Jun 05 2018 at 20:06, on Zulip):

It's only 9pm here, so I should be around for a while yet.

nikomatsakis (Jun 05 2018 at 20:06, on Zulip):

ah yeah, I forget you're only 5h

pnkfelix (Jun 05 2018 at 20:07, on Zulip):

on my end for diagnostics

pnkfelix (Jun 05 2018 at 20:07, on Zulip):

I'm hoping to address a bunch of issues at once

nikomatsakis (Jun 05 2018 at 20:07, on Zulip):

(ping @Reed Koser, you around?)

pnkfelix (Jun 05 2018 at 20:07, on Zulip):

I've been trying to at least take notes on the ones that might get touched

nikomatsakis (Jun 05 2018 at 20:07, on Zulip):

(also @Keith Yeung)

Keith Yeung (Jun 05 2018 at 20:07, on Zulip):

hello

Keith Yeung (Jun 05 2018 at 20:08, on Zulip):

i haven't been looking at the closure issues that i was supposed to look at, sorry

Keith Yeung (Jun 05 2018 at 20:08, on Zulip):

will try to find some time this week

pnkfelix (Jun 05 2018 at 20:08, on Zulip):

there is one big question that maybe we could talk about as a group

nikomatsakis (Jun 05 2018 at 20:08, on Zulip):

oh ok wasn't trying to shame you or anything ;)

pnkfelix (Jun 05 2018 at 20:08, on Zulip):

namely this one: https://github.com/rust-lang/rust/issues/51167

pnkfelix (Jun 05 2018 at 20:08, on Zulip):

"NLL: diagnostics deviate from source line order for no obvious reason"

nikomatsakis (Jun 05 2018 at 20:08, on Zulip):

was mostly just reaching out to see if we might ensure you were as busy as you want to be :)

pnkfelix (Jun 05 2018 at 20:09, on Zulip):

the basic issue in #51167 is that AST-borrowck would often present errors such that the ones that occur earlier in the source file likewise occur earlier in the stderr output

pnkfelix (Jun 05 2018 at 20:09, on Zulip):

NLL is failing to do this in some cases

pnkfelix (Jun 05 2018 at 20:09, on Zulip):

One can readily imagine that this is a "natural" consequence of an analysis that is just traversing a control-flow graph

pnkfelix (Jun 05 2018 at 20:10, on Zulip):

rather than the abstract syntax tree

nikomatsakis (Jun 05 2018 at 20:10, on Zulip):

when we visit all the basic blocks... we probably do it in kinda random order ...

pnkfelix (Jun 05 2018 at 20:10, on Zulip):

so my question is:

nikomatsakis (Jun 05 2018 at 20:10, on Zulip):

I bet if we walked in Reverse Post Order...

pnkfelix (Jun 05 2018 at 20:10, on Zulip):

Should we try to fix this? And if so, how?

nikomatsakis (Jun 05 2018 at 20:10, on Zulip):

my take is that we should try but not too hard :)

pnkfelix (Jun 05 2018 at 20:10, on Zulip):

Hmm, now that you say that @nikomatsakis , maybe the simplest thing would be to just walk the basic blocks in source order ... ?

nikomatsakis (Jun 05 2018 at 20:10, on Zulip):

like, if it's just a matter of "walk basic blocks in RPO", seems worth it

pnkfelix (Jun 05 2018 at 20:10, on Zulip):

e.g. sort by the span of the first statement in each one, or something like that?

nikomatsakis (Jun 05 2018 at 20:11, on Zulip):

or that

Reed Koser (Jun 05 2018 at 20:11, on Zulip):

I'm ~around now, haven't read scrollback yet. Supposed to be doing real job things =P

nikomatsakis (Jun 05 2018 at 20:11, on Zulip):

but RPO is usually source order

nikomatsakis (Jun 05 2018 at 20:11, on Zulip):

and we have functions that will give it to you

pnkfelix (Jun 05 2018 at 20:11, on Zulip):

I suppose RPO is worth a shot

nikomatsakis (Jun 05 2018 at 20:11, on Zulip):

https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/traversal/fn.reverse_postorder.html

pnkfelix (Jun 05 2018 at 20:11, on Zulip):

since I don't actually care so much abourt this for our end users

nikomatsakis (Jun 05 2018 at 20:11, on Zulip):

@Reed Koser ok :) I was going to suggest (based on our privmsgs) that you might be interested in looking at optimizing access_place

pnkfelix (Jun 05 2018 at 20:11, on Zulip):

I really just care about it for our internal process of using diff against the AST-borrowck output

davidtwco (Jun 05 2018 at 20:11, on Zulip):

This reminds me of the issue where we tried to suppress multiple errors occurring (rust-lang/rust#45697) - we added in a set to catch places that had errors reported but @nikomatsakis suggested that it'd be nice if we saved the errors and reported them at once so that we could easier detect things like duplicates - this would have been another benefit of that, could sort the spans or something like that before reporting.

pnkfelix (Jun 05 2018 at 20:12, on Zulip):

so if RPO handles most cases well, we should just turn that on and call it a day

nikomatsakis (Jun 05 2018 at 20:12, on Zulip):

ah, interesting point

Reed Koser (Jun 05 2018 at 20:12, on Zulip):

@nikomatsakis Sounds good. If there's a github issue, throw it my way and I'll try to take a look at it. Have to figure out how the scheduling will work there, but I definitely want to find some time

pnkfelix (Jun 05 2018 at 20:12, on Zulip):

@David Wood that's a good point

pnkfelix (Jun 05 2018 at 20:12, on Zulip):

there's times when i personally find it useful that we do not buffer the output

nikomatsakis (Jun 05 2018 at 20:13, on Zulip):

@Reed Koser ok there isn't one but I can make one

pnkfelix (Jun 05 2018 at 20:13, on Zulip):

but as long as we provided a -Z flag to bring back non-buffered behavior

nikomatsakis (Jun 05 2018 at 20:13, on Zulip):

@pnkfelix well, it'd be per-fn I guess

pnkfelix (Jun 05 2018 at 20:13, on Zulip):

@nikomatsakis right, I just mean

pnkfelix (Jun 05 2018 at 20:13, on Zulip):

the lack of buffering

pnkfelix (Jun 05 2018 at 20:13, on Zulip):

is useful for correlating error output

pnkfelix (Jun 05 2018 at 20:13, on Zulip):

with debug! output

Reed Koser (Jun 05 2018 at 20:13, on Zulip):

Sounds good. If there isn't one already don't feel the need to put too much detail in, it's just nice to have for tracking reasons

nikomatsakis (Jun 05 2018 at 20:13, on Zulip):

ah very true

nikomatsakis (Jun 05 2018 at 20:14, on Zulip):

though I usually use -Ztreat-err-as-bug for that, in which case I would hope we would still abort... and/or we could have an option to disable buffering...

pnkfelix (Jun 05 2018 at 20:14, on Zulip):

anyway that's about all I have to say about diagnostics I think ...

nikomatsakis (Jun 05 2018 at 20:14, on Zulip):

anyway

nikomatsakis (Jun 05 2018 at 20:15, on Zulip):

callgrind finished btw... now if I can only figure out how to work with the results... I guess I need to run kcachegrind

pnkfelix (Jun 05 2018 at 20:15, on Zulip):

I want to check one more time

pnkfelix (Jun 05 2018 at 20:16, on Zulip):

do we have any takers on looking at profiling inflate ?

lqd (Jun 05 2018 at 20:16, on Zulip):

Santiago is doing it rn

pnkfelix (Jun 05 2018 at 20:16, on Zulip):

oh sorry

pnkfelix (Jun 05 2018 at 20:17, on Zulip):

it was just important enough I wanted to make sure there was a name next to it on the Paper doc

davidtwco (Jun 05 2018 at 20:17, on Zulip):

Am I still profiling clap-rs to reproduce niko's measurements or did someone else say they'd handle that?

lqd (Jun 05 2018 at 20:18, on Zulip):

@pnkfelix better to make sure indeed :)

Santiago Pastorino (Jun 05 2018 at 20:18, on Zulip):

yep

Santiago Pastorino (Jun 05 2018 at 20:18, on Zulip):

I have it :)

Santiago Pastorino (Jun 05 2018 at 20:18, on Zulip):

as soon as I can compile :P

pnkfelix (Jun 05 2018 at 20:18, on Zulip):

@David Wood to be clear: profiling to reproduce niko's measurments was (in my head) step one before trying to diangose the mystery visit_mir case.

Santiago Pastorino (Jun 05 2018 at 20:18, on Zulip):

have been trying to compile rustc for hours

pnkfelix (Jun 05 2018 at 20:19, on Zulip):

@David Wood so yeah, I say do keep doing that. But I will also put your name next to the item that says "eproduce and try to diagnose the mystery visit_mir case", okay ?

davidtwco (Jun 05 2018 at 20:19, on Zulip):

Yeah, but I think it was later mentioned that @Santiago Pastorino would do that.

pnkfelix (Jun 05 2018 at 20:19, on Zulip):

I thought santiago was doing inflate

pnkfelix (Jun 05 2018 at 20:19, on Zulip):

/me goes to review the log

nikomatsakis (Jun 05 2018 at 20:19, on Zulip):

nah I think it two distinct things

davidtwco (Jun 05 2018 at 20:19, on Zulip):

I'm still happy to, just don't want to duplicate effort.

Santiago Pastorino (Jun 05 2018 at 20:20, on Zulip):

yeah, I think I'm not on that one :)

nikomatsakis (Jun 05 2018 at 20:20, on Zulip):

I think it makes sense for @Santiago Pastorino to focus on inflate and @David Wood to focus on the mystery visit_mir case

Santiago Pastorino (Jun 05 2018 at 20:20, on Zulip):

:+1:

nikomatsakis (Jun 05 2018 at 20:20, on Zulip):

btw I think callgrind also reproduced the same result:

6,000,525,213  < /home/nmatsakis/versioned/rust-m/src/librustc_mir/util/collect_writes.rs:rustc_mir::borrow_check::do_mir_borrowck (7966x)
2,361,456,991  *  /home/nmatsakis/versioned/rust-m/src/librustc/mir/visit.rs:rustc::mir::visit::Visitor::visit_mir [/home/nmatsakis/versioned/rust-m/build/x86_64-unknown-linux-gnu/stage2/lib/librustc_mir-320bbd82799b8bba.so]
nikomatsakis (Jun 05 2018 at 20:21, on Zulip):

I'm not 100% sure how to interpret that output ;) but I think it is listing the callers of visit_mir

pnkfelix (Jun 05 2018 at 20:21, on Zulip):

oh I see, @nikomatsakis did say "I guess that @Santiago Pastorino, if they are able to get perf up and going, would also be able to confirm the mystery visit_mir results"

Santiago Pastorino (Jun 05 2018 at 20:21, on Zulip):

ahh hehe, didn't read that quite well :P

pnkfelix (Jun 05 2018 at 20:21, on Zulip):

(just trying to confirm that @David Wood 's interpretation was entirely reasonable)

Santiago Pastorino (Jun 05 2018 at 20:22, on Zulip):

anyway, let's give that to @David Wood I guess

pnkfelix (Jun 05 2018 at 20:22, on Zulip):

okay great

pnkfelix (Jun 05 2018 at 20:22, on Zulip):

oh

pnkfelix (Jun 05 2018 at 20:22, on Zulip):

one more thing

pnkfelix (Jun 05 2018 at 20:22, on Zulip):

about logistics

pnkfelix (Jun 05 2018 at 20:22, on Zulip):

Niko: You're going to SF on Monday, right?

Santiago Pastorino (Jun 05 2018 at 20:23, on Zulip):

@nikomatsakis where's more info about the inflate thing?

Santiago Pastorino (Jun 05 2018 at 20:23, on Zulip):

maybe I missed something from this meeting

Santiago Pastorino (Jun 05 2018 at 20:23, on Zulip):

can read the log :)

nikomatsakis (Jun 05 2018 at 20:23, on Zulip):

it's all in that gist

nikomatsakis (Jun 05 2018 at 20:23, on Zulip):

there's not really more info

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

basically infate is slow

lqd (Jun 05 2018 at 20:24, on Zulip):

there’s little info besides: it’s slow and we don’t know why

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

much slower than anything else

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

if you look at http://perf.rust-lang.org/nll-dashboard.html

pnkfelix (Jun 05 2018 at 20:24, on Zulip):

Logistics: I expect that @nikomatsakis might be very distracted with a Mozilla All-Hands

pnkfelix (Jun 05 2018 at 20:24, on Zulip):

next week

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

you will see the NLL/regular ratio is 1000%

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

whereas most things are like 200%

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

that said, we should file some issues

nikomatsakis (Jun 05 2018 at 20:24, on Zulip):

I'll do that real quick

pnkfelix (Jun 05 2018 at 20:25, on Zulip):

I on the other hand won't be there. Instead I'll be somewhere ... that may not have high quality internet access

pnkfelix (Jun 05 2018 at 20:25, on Zulip):

(My mother tells me that they have that fixed it now)

pnkfelix (Jun 05 2018 at 20:25, on Zulip):

(So we will see...)

pnkfelix (Jun 05 2018 at 20:25, on Zulip):

Anyway, I hope to be able to run the meeting in a week's time.

pnkfelix (Jun 05 2018 at 20:26, on Zulip):

but if I cannot, its possible that Niko won't be able to do it either. I'm not sure.

pnkfelix (Jun 05 2018 at 20:26, on Zulip):

we'll figure it out on Monday I guess.

nikomatsakis (Jun 05 2018 at 20:27, on Zulip):

@Santiago Pastorino filed https://github.com/rust-lang/rust/issues/51377

pnkfelix (Jun 05 2018 at 20:27, on Zulip):

That's everything I had to say. If anyone has any questions, drop a line in any of the appropriate channels (e.g. Zulip topics under wg-nll)

Santiago Pastorino (Jun 05 2018 at 20:28, on Zulip):

@Santiago Pastorino filed https://github.com/rust-lang/rust/issues/51377

:+1:

nikomatsakis (Jun 05 2018 at 20:29, on Zulip):

incidentally these meetings are not taking 30 minutes :)

nikomatsakis (Jun 05 2018 at 20:29, on Zulip):

maybe that is unrealistic

nikomatsakis (Jun 05 2018 at 20:29, on Zulip):

or maybe we can get faster

nikomatsakis (Jun 05 2018 at 20:29, on Zulip):

but something to keep in mind

pnkfelix (Jun 05 2018 at 20:34, on Zulip):

incidentally these meetings are not taking 30 minutes :)

yeah I thought about forcing a hard ending right around the time that you said "I guess we need to talk about diagnostics." :)

pnkfelix (Jun 05 2018 at 20:35, on Zulip):

and I thought to myself ".... okay, lets do this thing."

nikomatsakis (Jun 05 2018 at 21:10, on Zulip):

and I thought to myself ".... okay, lets do this thing."

sorry :)

Jake Goulding (Jun 06 2018 at 02:42, on Zulip):

Should we try to fix [printing errors to match source order]?

If you could just make it so that the "most important" or "most fundamental" error was the one that showed up first, that would be wonderful.

Jake Goulding (Jun 06 2018 at 02:42, on Zulip):

That should be trivial to add :wink:

pnkfelix (Jun 06 2018 at 08:33, on Zulip):

Should we try to fix [printing errors to match source order]?

If you could just make it so that the "most important" or "most fundamental" error was the one that showed up first, that would be wonderful.

For end users, yes. But it wouldn't address the immediate issue I was getting at, which is trying to ease running diff between AST-borrowck and NLL.

Last update: Nov 21 2019 at 13:50UTC