Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upLots of cache misses building servo #97
Comments
This comment has been minimized.
This comment has been minimized.
|
After digging a bit more, it looks like the ordering of |
This comment has been minimized.
This comment has been minimized.
|
Additionally: the order of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
FWIW sorting I believe this is a bug that needs to be fixed in Cargo ( |
This comment has been minimized.
This comment has been minimized.
|
This makes sense. FWIW I'm only sorting them for the purposes of hashing the commandline arguments. For executing the compiler we still use the original ordering. |
luser
referenced this issue
Apr 4, 2017
Closed
cargo should consistently order -L and --cfg arguments in rustc commandlines #3895
luser
referenced this issue
May 1, 2017
Closed
Building webrender with sccache doesn't always hit the cache #114
This comment has been minimized.
This comment has been minimized.
|
I added an even-more-verbose set of logs to write out all the cache inputs for a crate to a file, and I noticed a few things:
|
This comment has been minimized.
This comment has been minimized.
|
Filed the |
This comment has been minimized.
This comment has been minimized.
So I already knew this, and have code to sort the With that change + my change to gl_generator I can build webrender and get 100% cache hits! I'll try it on servo next. |
luser
referenced this issue
May 17, 2017
Closed
Intermittent rustc panic when building with sccache #122
This comment has been minimized.
This comment has been minimized.
|
I fixed the handling of externs in 7ac81f2. |
This comment has been minimized.
This comment has been minimized.
|
Better!
It would be interesting to look at what those 23 non-cacheable calls are. The Servo build still spent a bunch of time compiling stuff like mozjs-sys, but I didn't have ccache enabled in my .servobuild, so I'll try using |
This comment has been minimized.
This comment has been minimized.
|
In any event, I think this particular issue is fixed. |
luser
closed this
May 18, 2017
This comment has been minimized.
This comment has been minimized.
|
Building servo (from servo/servo@61d64da) with the latest sccache, I now see:
So that's pretty good! Of the non-cacheable calls, most of them are C/C++, and most of those are things autoconf is doing. I opened a few new issues on some simple things we could fix to support things I noticed in the logs, but they're not going to buy us much. The breakdown of the non-cacheable calls is:
So there are 58 rustc invocations we refused to cache because of the crate type. Of those, most of them are
...and most of those are build scripts. There's probably not much more to be had here without doing a lot of hard work to cache linker invocations. |
This comment has been minimized.
This comment has been minimized.
metajack
commented
Aug 2, 2017
|
I recreated this today, and the results are improved. We're down to ~50 crate-types (proc-macro and binaries, mostly build.rs) and 1 stdin (not sure what this is) and 18 unknown extension, which are all conftest.C invocations from configure. However we have 32 cache misses, including all the expensive to compile crates. Right now sccache is only saving 4m on a 13m build for me. |
This comment has been minimized.
This comment has been minimized.
metajack
commented
Aug 2, 2017
|
"improved" was the wrong word there. The uncachable stuff is improved, but overall we are worse. |
This comment has been minimized.
This comment has been minimized.
|
@metajack Oh, so @glandium found another source of nondeterminism in webrender's build script recently: servo/webrender#1475 . Did servo pick up that fix? If not, try that and see if it works. With that fix we get 100% cache hits on a Firefox stylo build. |
luser commentedMar 31, 2017
I did a full build of servo with sccache, and then ran
./mach cleanand rebuilt, but it took a long time and the stats afterward showed:This should be able to get a 100% cache hit rate unless there's something funny going on. I suppose it's possible that the C/C++ dependencies that are being compiled are not reproducible, so they're causing some intermediate crates to be cache misses?