diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java | 6 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java | 6 |
2 files changed, 5 insertions, 7 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 7a3453a243..3d77021213 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 @@ -155,11 +155,10 @@ public abstract class FileStateValue implements SkyValue { try { byte[] digest = tryGetDigest(path, stat); if (digest == null) { - long mtime = stat.getLastModifiedTime(); // Note that TimestampGranularityMonitor#notifyDependenceOnFileTime is a thread-safe // method. if (tsgm != null) { - tsgm.notifyDependenceOnFileTime(path.asFragment(), mtime); + tsgm.notifyDependenceOnFileTime(path.asFragment(), stat.getLastChangeTime()); } return new RegularFileStateValue(stat.getSize(), null, FileContentsProxy.create(stat)); } else { @@ -256,10 +255,9 @@ public abstract class FileStateValue implements SkyValue { static SpecialFileStateValue fromStat(PathFragment path, FileStatus stat, @Nullable TimestampGranularityMonitor tsgm) throws IOException { - long mtime = stat.getLastModifiedTime(); // Note that TimestampGranularityMonitor#notifyDependenceOnFileTime is a thread-safe method. if (tsgm != null) { - tsgm.notifyDependenceOnFileTime(path, mtime); + tsgm.notifyDependenceOnFileTime(path, stat.getLastChangeTime()); } return new SpecialFileStateValue(FileContentsProxy.create(stat)); } diff --git a/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java b/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java index 215e74bbd5..dee3fb6ee7 100644 --- a/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java +++ b/src/main/java/com/google/devtools/build/lib/util/io/TimestampGranularityMonitor.java @@ -125,12 +125,12 @@ public class TimestampGranularityMonitor { * of a build file or source file with the specified time stamp. */ @ThreadSafe - public void notifyDependenceOnFileTime(PathFragment path, long mtime) { - if (mtime == this.commandStartTimeMillis) { + public void notifyDependenceOnFileTime(PathFragment path, long ctimeMillis) { + if (ctimeMillis == this.commandStartTimeMillis) { logger.info("Will have to wait for a millisecond on completion because of " + path); this.waitAMillisecond = true; } - if (mtime == this.commandStartTimeMillisRounded) { + if (ctimeMillis == this.commandStartTimeMillisRounded) { logger.info("Will have to wait for a second on completion because of " + path); this.waitASecond = true; } |