summaryrefslogtreecommitdiffstats
path: root/src/deps_log.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix minor typo.Elliott Sales de Andrade2017-09-161-1/+1
|
* Use 64-bit-alignment-safe timestamp reading.Elliott Sales de Andrade2017-09-161-2/+3
| | | | | Read and write the timestamp as two separate 32-bit integers in a fixed order to prevent any issues with alignment or byte order.
* Make TimeStamp 64-bit.Elliott Sales de Andrade2017-09-161-3/+4
| | | | This prepares it for higher-resolution timestamps.
* Remove 'Recompacting...' messages.Nico Weber2014-12-181-3/+1
| | | | | | | | | | Recompacting the build log used to be slow, so it made sense to print this message. We then made recompaction much faster, but didn't remove this message back then. The deps log only has it because the build log had it. Since both steps are effectively instant in practice, remove these log messages.
* Don't print "Recompacting..." message from tests.Nico Weber2014-09-191-1/+3
| | | | Now tests don't print anything. Non-test behavior is unchanged.
* Move duplicated code into a helper function.Nico Weber2014-01-041-0/+8
|
* Deps log format v3Nico Weber2013-08-281-3/+4
| | | | | | | | | | | | | | | This fixes two bugs. 1.) It makes the record size field 4 byte instead of 2, and allows a max record size of 512kB. This fixes #605, ninja "only" supporting 8k dependencies per file -- 512kB have room for 128k dependencies. (If that's still not enough, the current design can support at least 4x that if the constant is tweaked.) 2.) It makes all records 4-byte aligned, which is probably needed to make the `reinterpret_cast<int*>(buf)` work on SPARC (cf issue #481), and it's generally nicer too. (Since there's already one reinterpret_cast, convert a memcpy() to reinterpret_cast in another branch too).
* Suffix depslog path records with their expected index.Nico Weber2013-08-261-1/+3
| | | | | | | | | | | | | | | | | | ninja assumes that numbering path entries in the deps log in order produces valid dense integer ids. If two ninja processes write to the same deps log concurrently, this is not true. Store the expected indices of path records in the log and treat the rest of a deps log as invalid if the dense id of a path record doesn't match the expected id stored in the log. Addresses the rest of issue #595. This requires bumping the deps log file format version. Do not migrate the old version to the new, as the old format did not have this protection, and might hence contain invalid data. (Unlikely, but possible.) Also store the record id as one's complement, to make them look less like regular deps record values. Since each record is written atomically this isn't really necessary, but it makes the format somewhat more robust (and easier to read in a hex editor).
* Recompact the deps log when it gets too big.Nico Weber2013-05-011-5/+3
| | | | | Now that Recompact() keeps all data structures intact, it can just be called at the beginning of a build and the build will still work.
* Move updating DepsLog's deps_ array into its own function.Nico Weber2013-04-301-0/+3
| | | | No functionality change.
* Move some DepsLog::Deps initialization code into its constructor.Nico Weber2013-04-301-1/+2
| | | | No functionality change.
* add a test for truncated depsEvan Martin2013-04-261-0/+1
| | | | | This doesn't yet exhibit the full problems with truncation, but it's a start.
* add a test for the "deps out of date" caseEvan Martin2013-04-091-1/+2
| | | | It touched the various remaining XXXes in the code, hooray.
* depslog: track dead record countEvan Martin2013-04-081-0/+5
|
* add recompaction to depslogEvan Martin2013-04-081-0/+4
| | | | Not done automatically yet, just an implementation and a test.
* clarify depslog overviewEvan Martin2013-04-081-4/+5
|
* expand DepsLog test, fix two bugs it revealedEvan Martin2013-04-081-0/+5
|
* use DepsLog in loading dependenciesEvan Martin2013-04-081-6/+6
| | | | WIP
* add DepsLog, a new data structure for dependency informationEvan Martin2013-04-081-0/+91
DepsLog is a compact serialization of dependency information. It can be used to replace depfiles for faster loading.