diff options
author | Dong-Heon Jung <dheon.jung@samsung.com> | 2019-10-18 09:23:51 +0900 |
---|---|---|
committer | 정동헌/Common Platform Lab(SR)/Principal Engineer/삼성전자 <dheon.jung@samsung.com> | 2019-12-03 14:58:35 +0900 |
commit | 3d4d8f7a45f53f4bc9c91921143ce3e91a5c03ea (patch) | |
tree | 89a19bb2c5f043544fbd235981e69b8f93496c46 | |
parent | 4b8fcc6d449e3bcd9c5e95181c063e6ce73e40d1 (diff) | |
download | coreclr-3d4d8f7a45f53f4bc9c91921143ce3e91a5c03ea.tar.gz coreclr-3d4d8f7a45f53f4bc9c91921143ce3e91a5c03ea.tar.bz2 coreclr-3d4d8f7a45f53f4bc9c91921143ce3e91a5c03ea.zip |
Enable NGEN for methods marked with AggressiveOptimization (#27259)
- Methods marked with AggressiveOptimization are not NGENed at all.
- The methods are compiled during the runtime with high JITC overhead.
- It makes launching time slower over 6% in our embedded systems.
-rw-r--r-- | src/zap/zapinfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp index d36d6505d7..dd49d6ab2b 100644 --- a/src/zap/zapinfo.cpp +++ b/src/zap/zapinfo.cpp @@ -445,7 +445,9 @@ void ZapInfo::CompileMethod() // Retrieve method attributes from EEJitInfo - the ZapInfo's version updates // some of the flags related to hardware intrinsics but we don't want that. DWORD methodAttribs = m_pEEJitInfo->getMethodAttribs(m_currentMethodHandle); - if (methodAttribs & CORINFO_FLG_AGGRESSIVE_OPT) + +#ifdef FEATURE_READYTORUN_COMPILER + if (IsReadyToRunCompilation() && (methodAttribs & CORINFO_FLG_AGGRESSIVE_OPT)) { // Skip methods marked with MethodImplOptions.AggressiveOptimization, they will be jitted instead. In the future, // consider letting the JIT determine whether aggressively optimized code can/should be pregenerated for the method @@ -454,6 +456,7 @@ void ZapInfo::CompileMethod() m_zapper->Info(W("Skipped because of aggressive optimization flag\n")); return; } +#endif #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) if (methodAttribs & CORINFO_FLG_JIT_INTRINSIC) |