Comments (2)
I presented a draft of possible solution in #66: while doing direct cache search and going through a list of dependencies, we add an additional check that the input file is contained within this list. If the input file name is missing from the list, that that cache entry must have been constructed from a different source file (at least, from a different absolute/relative location as seen by compiler command line), and we avoid hitting it. This leads to the following:
All the entries with the same source file content "contend" for direct cache entry: for example, if we compile the attached code with patched version from clean checkout multiple times, then neither a/file.c
nor b/file.c
will hit direct cache, because after compiling a/file.c
the cache entry will "point" to that file as a dependency, and the cache will miss compiling b/file.c
thereafter, and vice versa: after compiling b/file.c
the entry will point to that file, and if we begin another try with a/file.c
, we again miss direct cache.
However, both items will be served by simple cache just fine, and if we do not "repoint" direct cache entry by compiling another file with the same content in-between, then every entry has a chance to hit direct cache too (e.g. double compilation of a/file.c
alone will give direct cache hit as before).
I think this rare direct cache misses for source files with the same content are worth paying for possible false positives.
from dist-clang.
Fixed in #67.
from dist-clang.
Related Issues (20)
- Write README (How to deploy distclang on your servers/clients) HOT 1
- Keep order of compiler arguments after splitting in different lists
- Command '--print-file-name' prints two lines instead of one
- Restrict clients on absorber according to their version
- Store the SQLite file cache index on disk
- Collect stats about cache hits on each entry
- Store actual object and etc. files via client
- Solve https://bugzilla.samba.org/show_bug.cgi?id=8424
- Actualize expectations about a compiler path in messages from client
- /usr/bin/dist-clang/clang++ -print-prog-name=ld incorrect result HOT 1
- Try to move to gflags library
- Bundle llvm and clang into repository
- Implement framework for custom tools
- Get from configuration the process run timeouts HOT 1
- Allow to parse Clang args externally
- clangd does not correctly exit on SIGTERM and SIGINT in most situations HOT 2
- Try to move to Bazel build system HOT 1
- Do not fail to write entry into malformed SQLite database
- Integrate with Travis build system HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dist-clang.