feat(tvix): Convert some DLOGs to VLOGs
It seems like the amount of logging is causing things to move a little slower - even if that's not really the case, it gets in the way of debugging things. Refs: b/76 Change-Id: I9ea99a3b16e3307a0b0371bad22d03b0e2175af6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2134 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
64ef09c475
commit
9945bd1746
6 changed files with 10 additions and 10 deletions
4
third_party/nix/src/libexpr/eval.cc
vendored
4
third_party/nix/src/libexpr/eval.cc
vendored
|
@ -688,7 +688,7 @@ void EvalState::evalFile(const Path& path_, Value& v) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLOG(INFO) << "evaluating file '" << path2 << "'";
|
VLOG(2) << "evaluating file '" << path2 << "'";
|
||||||
Expr* e = nullptr;
|
Expr* e = nullptr;
|
||||||
|
|
||||||
auto j = fileParseCache.find(path2);
|
auto j = fileParseCache.find(path2);
|
||||||
|
@ -1541,7 +1541,7 @@ std::string EvalState::copyPathToStore(PathSet& context, const Path& path) {
|
||||||
: store->addToStore(baseNameOf(path), checkSourcePath(path), true,
|
: store->addToStore(baseNameOf(path), checkSourcePath(path), true,
|
||||||
htSHA256, defaultPathFilter, repair);
|
htSHA256, defaultPathFilter, repair);
|
||||||
srcToStore[path] = dstPath;
|
srcToStore[path] = dstPath;
|
||||||
DLOG(INFO) << "copied source '" << path << "' -> '" << dstPath << "'";
|
VLOG(2) << "copied source '" << path << "' -> '" << dstPath << "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
context.insert(dstPath);
|
context.insert(dstPath);
|
||||||
|
|
4
third_party/nix/src/libexpr/parser.cc
vendored
4
third_party/nix/src/libexpr/parser.cc
vendored
|
@ -322,8 +322,8 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DLOG(INFO) << "resolved search path element '" << elem.second << "' to '"
|
VLOG(2) << "resolved search path element '" << elem.second << "' to '"
|
||||||
<< res.second << "'";
|
<< res.second << "'";
|
||||||
|
|
||||||
searchPathResolved[elem.second] = res;
|
searchPathResolved[elem.second] = res;
|
||||||
return res;
|
return res;
|
||||||
|
|
2
third_party/nix/src/libexpr/primops.cc
vendored
2
third_party/nix/src/libexpr/primops.cc
vendored
|
@ -745,7 +745,7 @@ static void prim_derivationStrict(EvalState& state, const Pos& pos,
|
||||||
/* Write the resulting term into the Nix store directory. */
|
/* Write the resulting term into the Nix store directory. */
|
||||||
Path drvPath = writeDerivation(state.store, drv, drvName, state.repair);
|
Path drvPath = writeDerivation(state.store, drv, drvName, state.repair);
|
||||||
|
|
||||||
DLOG(INFO) << "instantiated '" << drvName << "' -> '" << drvPath << "'";
|
VLOG(2) << "instantiated '" << drvName << "' -> '" << drvPath << "'";
|
||||||
|
|
||||||
/* Optimisation, but required in read-only mode! because in that
|
/* Optimisation, but required in read-only mode! because in that
|
||||||
case we don't actually write store derivations, so we can't
|
case we don't actually write store derivations, so we can't
|
||||||
|
|
|
@ -160,7 +160,7 @@ GitInfo exportGit(ref<Store> store, const std::string& uri,
|
||||||
: absl::StripTrailingAsciiWhitespace(readFile(localRefFile));
|
: absl::StripTrailingAsciiWhitespace(readFile(localRefFile));
|
||||||
gitInfo.shortRev = std::string(gitInfo.rev, 0, 7);
|
gitInfo.shortRev = std::string(gitInfo.rev, 0, 7);
|
||||||
|
|
||||||
DLOG(INFO) << "using revision " << gitInfo.rev << " of repo '" << uri << "'";
|
VLOG(2) << "using revision " << gitInfo.rev << " of repo '" << uri << "'";
|
||||||
|
|
||||||
std::string storeLinkName =
|
std::string storeLinkName =
|
||||||
hashString(htSHA512, name + std::string("\0"s) + gitInfo.rev)
|
hashString(htSHA512, name + std::string("\0"s) + gitInfo.rev)
|
||||||
|
|
2
third_party/nix/src/libstore/download.cc
vendored
2
third_party/nix/src/libstore/download.cc
vendored
|
@ -588,7 +588,7 @@ struct CurlDownloader : public Downloader {
|
||||||
nextWakeup - std::chrono::steady_clock::now())
|
nextWakeup - std::chrono::steady_clock::now())
|
||||||
.count()))
|
.count()))
|
||||||
: maxSleepTimeMs;
|
: maxSleepTimeMs;
|
||||||
DLOG(INFO) << "download thread waiting for " << sleepTimeMs << " ms";
|
VLOG(2) << "download thread waiting for " << sleepTimeMs << " ms";
|
||||||
mc = curl_multi_wait(curlm, extraFDs, 1, sleepTimeMs, &numfds);
|
mc = curl_multi_wait(curlm, extraFDs, 1, sleepTimeMs, &numfds);
|
||||||
if (mc != CURLM_OK) {
|
if (mc != CURLM_OK) {
|
||||||
throw nix::Error(format("unexpected error from curl_multi_wait(): %s") %
|
throw nix::Error(format("unexpected error from curl_multi_wait(): %s") %
|
||||||
|
|
6
third_party/nix/src/libstore/pathlocks.cc
vendored
6
third_party/nix/src/libstore/pathlocks.cc
vendored
|
@ -92,7 +92,7 @@ bool PathLocks::lockPaths(const PathSet& paths, const std::string& waitMsg,
|
||||||
checkInterrupt();
|
checkInterrupt();
|
||||||
Path lockPath = path + ".lock";
|
Path lockPath = path + ".lock";
|
||||||
|
|
||||||
DLOG(INFO) << "locking path '" << path << "'";
|
VLOG(2) << "locking path '" << path << "'";
|
||||||
|
|
||||||
AutoCloseFD fd;
|
AutoCloseFD fd;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ bool PathLocks::lockPaths(const PathSet& paths, const std::string& waitMsg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DLOG(INFO) << "lock acquired on '" << lockPath << "'";
|
VLOG(2) << "lock acquired on '" << lockPath << "'";
|
||||||
|
|
||||||
/* Check that the lock file hasn't become stale (i.e.,
|
/* Check that the lock file hasn't become stale (i.e.,
|
||||||
hasn't been unlinked). */
|
hasn't been unlinked). */
|
||||||
|
@ -159,7 +159,7 @@ void PathLocks::unlock() {
|
||||||
LOG(WARNING) << "cannot close lock file on '" << i.second << "'";
|
LOG(WARNING) << "cannot close lock file on '" << i.second << "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
DLOG(INFO) << "lock released on '" << i.second << "'";
|
VLOG(2) << "lock released on '" << i.second << "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
fds.clear();
|
fds.clear();
|
||||||
|
|
Loading…
Reference in a new issue