diff options
author | Nico Weber <thakis@chromium.org> | 2013-07-08 19:34:46 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2013-07-08 19:34:46 (GMT) |
commit | 8de46a9685f562b75319bb48263e8c787e86d48b (patch) | |
tree | 21f41c2d59b4cfb0a5b467ccdfaa293946c157b1 /src/deps_log.cc | |
parent | 1f7fa18dea3a57653811f75072871da08d1cff7b (diff) | |
download | Ninja-8de46a9685f562b75319bb48263e8c787e86d48b.zip Ninja-8de46a9685f562b75319bb48263e8c787e86d48b.tar.gz Ninja-8de46a9685f562b75319bb48263e8c787e86d48b.tar.bz2 |
Add a 'recompact' tool, which forces recompaction of the build and deps logs.
This is useful for performance comparisons between two build directories.
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r-- | src/deps_log.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc index ce9bf06..63e0d95 100644 --- a/src/deps_log.cc +++ b/src/deps_log.cc @@ -43,7 +43,6 @@ DepsLog::~DepsLog() { bool DepsLog::OpenForWrite(const string& path, string* err) { if (needs_recompaction_) { - Close(); if (!Recompact(path, err)) return false; } @@ -265,6 +264,7 @@ bool DepsLog::Recompact(const string& path, string* err) { METRIC_RECORD(".ninja_deps recompact"); printf("Recompacting deps...\n"); + Close(); string temp_path = path + ".recompact"; // OpenForWrite() opens for append. Make sure it's not appending to a |