diff options
author | Pat Gavlin <pgavlin@gmail.com> | 2017-02-13 14:42:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 14:42:40 -0800 |
commit | 63af0e030f9c2de244dbc997822169a1f3dc8c92 (patch) | |
tree | 061658f63f95c83a7528ba2aa01ca150c7895859 | |
parent | ead3045fa6e4a43fc16f59a627bc8040df039511 (diff) | |
parent | fdbd420a4df2f43219c2b149f0972c20f1590ba2 (diff) | |
download | coreclr-63af0e030f9c2de244dbc997822169a1f3dc8c92.tar.gz coreclr-63af0e030f9c2de244dbc997822169a1f3dc8c92.tar.bz2 coreclr-63af0e030f9c2de244dbc997822169a1f3dc8c92.zip |
Merge pull request #9563 from pgavlin/FixPrintCsvHeader
Fix `JitTimeLog::PrintCsvHeader`.
-rw-r--r-- | src/jit/compiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp index 613e8ee4f6..3eab115862 100644 --- a/src/jit/compiler.cpp +++ b/src/jit/compiler.cpp @@ -7807,6 +7807,9 @@ void JitTimer::PrintCsvHeader() FILE* fp = _wfopen(jitTimeLogCsv, W("a")); if (fp != nullptr) { + // Seek to the end of the file s.t. `ftell` doesn't lie to us on Windows + fseek(fp, 0, SEEK_END); + // Write the header if the file is empty if (ftell(fp) == 0) { |