diff options
author | 2016-11-01 21:02:52 +0000 | |
---|---|---|
committer | 2016-11-02 08:29:14 +0000 | |
commit | 472b411d3e6d8efcdbc1a019cffc89f5714b490a (patch) | |
tree | 1fdd201e9f4ff48105ffcd1b03c6ebce4b13b2ae /src/main/java/com/google/devtools/build/lib/skyframe | |
parent | 4d80aa7a5c75b6fd4684b7337d71974388c6e687 (diff) |
Add logging to TimestampGranularityMonitor.
These new log statements help in understanding what files trigger the
TimestampGranularityMonitor's wait logic and when the wait is performed.
--
MOS_MIGRATED_REVID=137868235
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java index b08cec71ac..bd6038f33a 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java @@ -89,7 +89,7 @@ public abstract class FileStateValue implements SkyValue { Path path = rootedPath.asPath(); if (statNoFollow.isFile()) { return statNoFollow.isSpecialFile() - ? SpecialFileStateValue.fromStat(statNoFollow, tsgm) + ? SpecialFileStateValue.fromStat(path.asFragment(), statNoFollow, tsgm) : RegularFileStateValue.fromPath(path, statNoFollow, tsgm); } else if (statNoFollow.isDirectory()) { return DIRECTORY_FILE_STATE_NODE; @@ -172,7 +172,7 @@ public abstract class FileStateValue implements SkyValue { // Note that TimestampGranularityMonitor#notifyDependenceOnFileTime is a thread-safe // method. if (tsgm != null) { - tsgm.notifyDependenceOnFileTime(mtime); + tsgm.notifyDependenceOnFileTime(path.asFragment(), mtime); } return new RegularFileStateValue(stat.getSize(), stat.getLastModifiedTime(), null, FileContentsProxy.create(mtime, stat.getNodeId())); @@ -261,13 +261,13 @@ public abstract class FileStateValue implements SkyValue { this.contentsProxy = contentsProxy; } - static SpecialFileStateValue fromStat(FileStatusWithDigest stat, + static SpecialFileStateValue fromStat(PathFragment path, FileStatusWithDigest stat, @Nullable TimestampGranularityMonitor tsgm) throws IOException { long mtime = stat.getLastModifiedTime(); // Note that TimestampGranularityMonitor#notifyDependenceOnFileTime is a thread-safe // method. if (tsgm != null) { - tsgm.notifyDependenceOnFileTime(mtime); + tsgm.notifyDependenceOnFileTime(path, mtime); } return new SpecialFileStateValue(FileContentsProxy.create(mtime, stat.getNodeId())); } |