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

incr.comp.: Full re-use regression for unchanged code bases #39828

Closed
michaelwoerister opened this issue Feb 14, 2017 · 4 comments
Closed

incr.comp.: Full re-use regression for unchanged code bases #39828

michaelwoerister opened this issue Feb 14, 2017 · 4 comments
Labels
A-incr-comp Area: Incremental compilation

Comments

@michaelwoerister
Copy link
Member

A while ago we stopped getting full re-use when re-compiling an unchanged code base in the rust-icci tests:

The regression seems to have been introduced in this commit range, which includes the new graph reduction algorithm: 0648517...ea7a648

cc @nikomatsakis

@michaelwoerister michaelwoerister added the A-incr-comp Area: Incremental compilation label Feb 14, 2017
@nikomatsakis
Copy link
Contributor

Hmm, I am trying to reproduce this and so far I'm not succeeding. I see full re-use for rand at the given commit, at least, when using either the latest nightly or my local build (which is at the commit 3954c70). I'll take a look at the others.

@nikomatsakis
Copy link
Contributor

One thing is that I am not seeing as many modules as the logs report. Perhaps I am not using the right set of switches.

@nikomatsakis
Copy link
Contributor

The problem seems to be specific to crates that contain only generic items. In these cases, we get an empty serialized dep-graph. I think that, in the new representation, if there are literally no edges then we wind up never created the work-product nodes from last time, and hence we conclude they are dirty.

Roughly speaking the problem is that the second rustc run gets no re-use here:

lunch-box. rustc ~/tmp/foo.rs -Zincremental=$PWD/incr -Zincremental-info
incremental: 9840 nodes in dep-graph
incremental: 13341 edges in dep-graph
incremental: 0 edges in serialized dep-graph
incremental: 0 hashes in serialized dep-graph
incremental: re-using 0 out of 1 modules
lunch-box. rustc ~/tmp/foo.rs -Zincremental=$PWD/incr -Zincremental-info
incremental: session directory: 4 files hard-linked
incremental: session directory: 0 files copied
incremental: 9840 nodes in dep-graph
incremental: 13341 edges in dep-graph
incremental: 0 edges in serialized dep-graph
incremental: 0 hashes in serialized dep-graph
incremental: re-using 0 out of 1 modules
lunch-box. cat ~/tmp/foo.rs
#![crate_type="rlib"]
pub fn foo<T>() { }

@nikomatsakis
Copy link
Contributor

Fix here: #40038

eddyb added a commit to eddyb/rust that referenced this issue Feb 25, 2017
…woerister

detect "bootstrap outputs" when serializing the dep-graph

Fixes rust-lang#39828.

r? @michaelwoerister
eddyb added a commit to eddyb/rust that referenced this issue Feb 25, 2017
…woerister

detect "bootstrap outputs" when serializing the dep-graph

Fixes rust-lang#39828.

r? @michaelwoerister
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation
Projects
None yet
Development

No branches or pull requests

2 participants