From: Peter Kukol Date: Tue, 6 Sep 2016 16:21:13 +0000 (-0600) Subject: Enable FEATURE_JIT_METHOD_PERF always (even when FEATURE_CORECLR is on). (dotnet... X-Git-Tag: submit/tizen/20210909.063632~11030^2~9484 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b05c60ca96147fa51328c5b78864d2492abe232;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Enable FEATURE_JIT_METHOD_PERF always (even when FEATURE_CORECLR is on). (dotnet/coreclr#7028) Commit migrated from https://github.com/dotnet/coreclr/commit/e70de80ef88f15cdc694ed773006854c1ed0b681 --- diff --git a/src/coreclr/src/inc/switches.h b/src/coreclr/src/inc/switches.h index 3b94631..f52f24b 100644 --- a/src/coreclr/src/inc/switches.h +++ b/src/coreclr/src/inc/switches.h @@ -203,12 +203,12 @@ // hardware instructions (rdtsc), for accessing high-resolution hardware timers is enabled. This is disabled // in Silverlight (just to avoid thinking about whether the extra code space is worthwhile). #define FEATURE_JIT_TIMER +#endif // FEATURE_CORECLR // This feature in RyuJIT supersedes the FEATURE_JIT_TIMER. In addition to supporting the time log file, this // feature also supports using COMPlus_JitTimeLogCsv=a.csv, which will dump method-level and phase-level timing // statistics. Also see comments on FEATURE_JIT_TIMER. #define FEATURE_JIT_METHOD_PERF -#endif // FEATURE_CORECLR #ifndef FEATURE_USE_ASM_GC_WRITE_BARRIERS diff --git a/src/coreclr/src/jit/compiler.cpp b/src/coreclr/src/jit/compiler.cpp index f127b70..afbecdf 100644 --- a/src/coreclr/src/jit/compiler.cpp +++ b/src/coreclr/src/jit/compiler.cpp @@ -7202,7 +7202,8 @@ void JitTimer::PrintCsvHeader() CritSecHolder csvLock(s_csvLock); - if (_waccess(jitTimeLogCsv, 0) == -1) + FILE* fp = _wfopen(jitTimeLogCsv, W("r")); + if (fp == nullptr) { // File doesn't exist, so create it and write the header @@ -7225,8 +7226,8 @@ void JitTimer::PrintCsvHeader() fprintf(fp, "\"Total Cycles\","); fprintf(fp, "\"CPS\"\n"); - fclose(fp); } + fclose(fp); } extern ICorJitHost* g_jitHost; diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index 455b78f..05047c5 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -996,7 +996,7 @@ public: // This is the unique CompTimeSummaryInfo object for this instance of the runtime. static CompTimeSummaryInfo s_compTimeSummary; - CompTimeSummaryInfo() : m_total(0), m_maximum(0), m_numMethods(0), m_filtered(0), m_numFilteredMethods(0) + CompTimeSummaryInfo() : m_numMethods(0), m_total(0), m_maximum(0), m_numFilteredMethods(0), m_filtered(0) { }