summaryrefslogtreecommitdiffstats
path: root/src/deps_log.cc
Commit message (Collapse)AuthorAgeFilesLines
* Recompact the deps log when it gets too big.Nico Weber2013-05-011-2/+19
| | | | | 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.
* Keep a DepsLog's data valid after a call to DepsLog::Recompact().Nico Weber2013-05-011-5/+8
| | | | | | Previously, a DepsLog would become invalid after Recompact() was called, due to Recompact() making all node ids refer to a temporary DepsLog object constructed in Recompact().
* Let DepsLog::RecordDeps() update its in-memory representation.Nico Weber2013-04-301-0/+7
| | | | | | This is a behavior change, but it should be safe: Graph only queries the deps log at startup, before running any command. Nothing else currently queries the deps log.
* Move updating DepsLog's deps_ array into its own function.Nico Weber2013-04-301-6/+12
| | | | No functionality change.
* Move some DepsLog::Deps initialization code into its constructor.Nico Weber2013-04-301-4/+1
| | | | No functionality change.
* Merge pull request #558 from nico/buildfixEvan Martin2013-04-291-3/+1
|\ | | | | Introduce a Truncate() function that works on POSIX and Windows.
| * Introduce a Truncate() function that works on POSIX and Windows.Nico Weber2013-04-291-3/+1
| | | | | | | | Hopefully fixes the build on Windows.
* | Merge pull request #556 from nico/unlinkEvan Martin2013-04-291-0/+5
|\ \ | | | | | | Make sure that recompaction writes a pristine new depslog.
| * | Make sure that recompaction writes a pristine new depslog.Nico Weber2013-04-291-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | ...even if a prior run of DepsLog::Recompact() exited without cleaning up, for example due to a crash or because someone added a `return true;` in the middle of the function while debugging. Or because someone hits ctrl-c during deps log recompaction. No test, because I can't think of a way to trigger this scenario programmatically. Part of issue #554.
* | Don't crash during deps log recompaction if there's more than one deps entry.Nico Weber2013-04-291-0/+2
|/ | | | Part of issue #554.
* don't count eof as truncatedEvan Martin2013-04-271-1/+2
|
* fix warningEvan Martin2013-04-271-1/+1
|
* deps log: recover on truncated entryEvan Martin2013-04-271-6/+35
| | | | | | If a read fails while reading an entry, truncate the log to the last successfully read entry. This prevents corruption when a subsequent run appends another entry.
* Merge pull request #535 from sgraham/fix-windows-depslogEvan Martin2013-04-091-0/+2
|\ | | | | fix windows build after depslog
| * fix windows build after depslogScott Graham2013-04-091-0/+2
| |
* | On invalid depslog header, restart build instead of showing an error.Nico Weber2013-04-091-9/+5
|/ | | | Also add tests for invalid headers.
* Write the depslog version in binary instead of text.Nico Weber2013-04-091-5/+12
| | | | | | This way, it doubles as a byte-order marker. The header is now exactly one line in a hex editor, and it's still relatively easy to look at the version in a text editor.
* add a test for the "deps out of date" caseEvan Martin2013-04-091-1/+5
| | | | It touched the various remaining XXXes in the code, hooray.
* don't call .front() on an empty vectorEvan Martin2013-04-081-1/+2
| | | | Fixes a gcc debug-mode assertion.
* missing headerEvan Martin2013-04-081-0/+1
|
* depslog: track dead record countEvan Martin2013-04-081-1/+3
|
* add recompaction to depslogEvan Martin2013-04-081-10/+53
| | | | Not done automatically yet, just an implementation and a test.
* make old deps format migration actually workEvan Martin2013-04-081-5/+4
|
* record and check depslog file versionEvan Martin2013-04-081-4/+24
| | | | Future-proofing against some change we may need to make later.
* don't write out deps entries if nothing changedEvan Martin2013-04-081-2/+30
| | | | Shortcuts a common case.
* windows: add uint16 casts in depslogEvan Martin2013-04-081-2/+2
|
* track deps log load time in metricsEvan Martin2013-04-081-0/+2
|
* expand DepsLog test, fix two bugs it revealedEvan Martin2013-04-081-5/+4
|
* no error if deps log doesn't existEvan Martin2013-04-081-0/+2
|
* use DepsLog in loading dependenciesEvan Martin2013-04-081-0/+6
| | | | WIP
* add DepsLog, a new data structure for dependency informationEvan Martin2013-04-081-0/+149
DepsLog is a compact serialization of dependency information. It can be used to replace depfiles for faster loading.