diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-04-30 16:24:48 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-05-01 18:07:37 (GMT) |
commit | c5ea04bfc5d59fb82e8a6f0d356770883939f751 (patch) | |
tree | c3e7e68f1e572d4ac6f2a85ea86c0060526c0965 /src/deps_log.h | |
parent | 1eaacc8ccf26363ae3a820675721164873a31f3d (diff) | |
download | Ninja-c5ea04bfc5d59fb82e8a6f0d356770883939f751.zip Ninja-c5ea04bfc5d59fb82e8a6f0d356770883939f751.tar.gz Ninja-c5ea04bfc5d59fb82e8a6f0d356770883939f751.tar.bz2 |
Recompact the deps log when it gets too big.
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.
Diffstat (limited to 'src/deps_log.h')
-rw-r--r-- | src/deps_log.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/deps_log.h b/src/deps_log.h index 7270916..de0fe63 100644 --- a/src/deps_log.h +++ b/src/deps_log.h @@ -61,7 +61,7 @@ struct State; /// wins, allowing updates to just be appended to the file. A separate /// repacking step can run occasionally to remove dead records. struct DepsLog { - DepsLog() : dead_record_count_(0), file_(NULL) {} + DepsLog() : needs_recompaction_(false), file_(NULL) {} ~DepsLog(); // Writing (build-time) interface. @@ -96,11 +96,9 @@ struct DepsLog { // Write a node name record, assigning it an id. bool RecordId(Node* node); - /// Number of deps record read while loading the file that ended up - /// being unused (due to a latter entry superceding it). - int dead_record_count_; - + bool needs_recompaction_; FILE* file_; + /// Maps id -> Node. vector<Node*> nodes_; /// Maps id -> deps of that id. |