diff options
author | Andy Ayers <andya@microsoft.com> | 2018-01-31 18:01:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-31 18:01:22 -0800 |
commit | aae7a39751eb4b63c46991a56e3bf5c65ea21715 (patch) | |
tree | 6971539e234d4118280f895cb164bbd7a72a65a7 /src/vm/eventtrace.cpp | |
parent | 8dde886767682feac4b5414366dfae7be3c08412 (diff) | |
download | coreclr-aae7a39751eb4b63c46991a56e3bf5c65ea21715.tar.gz coreclr-aae7a39751eb4b63c46991a56e3bf5c65ea21715.tar.bz2 coreclr-aae7a39751eb4b63c46991a56e3bf5c65ea21715.zip |
Add ETL flags for ReadyToRun (#15801)
Add flags to track the presence of ReadyToRun codegen in an assembly
and module.
Add jitting flags to indicate when a method is jitted because the
precompiled code was rejected, either by a profiler or by ReadyToRun
dependence tracking.
Together these can be used to distingish between
* methods jitted because their assemblies were not precompiled
* methods jitted because they were not precompiled in an otherwise
precompiled assembly
Diffstat (limited to 'src/vm/eventtrace.cpp')
-rw-r--r-- | src/vm/eventtrace.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp index 5fb63c90fe..7da80608d7 100644 --- a/src/vm/eventtrace.cpp +++ b/src/vm/eventtrace.cpp @@ -5277,7 +5277,7 @@ HRESULT ETW::CodeSymbolLog::ReadInMemorySymbols( /*******************************************************/ /* This is called by the runtime when a method is jitted completely */ /*******************************************************/ -VOID ETW::MethodLog::MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrClassName, SString *methodName, SString *methodSignature, SIZE_T pCode, ReJITID rejitID) +VOID ETW::MethodLog::MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrClassName, SString *methodName, SString *methodSignature, SIZE_T pCode, ReJITID rejitID, BOOL bProfilerRejectedPrecompiledCode, BOOL bReadyToRunRejectedPrecompiledCode) { CONTRACTL { NOTHROW; @@ -5290,7 +5290,7 @@ VOID ETW::MethodLog::MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrC TRACE_LEVEL_INFORMATION, CLR_JIT_KEYWORD)) { - ETW::MethodLog::SendMethodEvent(pMethodDesc, ETW::EnumerationLog::EnumerationStructs::JitMethodLoad, TRUE, namespaceOrClassName, methodName, methodSignature, pCode, rejitID); + ETW::MethodLog::SendMethodEvent(pMethodDesc, ETW::EnumerationLog::EnumerationStructs::JitMethodLoad, TRUE, namespaceOrClassName, methodName, methodSignature, pCode, rejitID, bProfilerRejectedPrecompiledCode, bReadyToRunRejectedPrecompiledCode); } if(ETW_TRACING_CATEGORY_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context, @@ -5803,6 +5803,7 @@ VOID ETW::LoaderLog::SendAssemblyEvent(Assembly *pAssembly, DWORD dwEventOptions BOOL bIsCollectibleAssembly = pAssembly->IsCollectible(); BOOL bIsDomainNeutral = pAssembly->IsDomainNeutral() ; BOOL bHasNativeImage = pAssembly->GetManifestFile()->HasNativeImage(); + BOOL bIsReadyToRun = pAssembly->GetManifestFile()->IsILImageReadyToRun(); ULONGLONG ullAssemblyId = (ULONGLONG)pAssembly; ULONGLONG ullDomainId = (ULONGLONG)pAssembly->GetDomain(); @@ -5810,7 +5811,8 @@ VOID ETW::LoaderLog::SendAssemblyEvent(Assembly *pAssembly, DWORD dwEventOptions ULONG ulAssemblyFlags = ((bIsDomainNeutral ? ETW::LoaderLog::LoaderStructs::DomainNeutralAssembly : 0) | (bIsDynamicAssembly ? ETW::LoaderLog::LoaderStructs::DynamicAssembly : 0) | (bHasNativeImage ? ETW::LoaderLog::LoaderStructs::NativeAssembly : 0) | - (bIsCollectibleAssembly ? ETW::LoaderLog::LoaderStructs::CollectibleAssembly : 0)); + (bIsCollectibleAssembly ? ETW::LoaderLog::LoaderStructs::CollectibleAssembly : 0) | + (bIsReadyToRun ? ETW::LoaderLog::LoaderStructs::ReadyToRunAssembly : 0)); SString sAssemblyPath; pAssembly->GetDisplayName(sAssemblyPath); @@ -6127,12 +6129,14 @@ VOID ETW::LoaderLog::SendModuleEvent(Module *pModule, DWORD dwEventOptions, BOOL { bIsIbcOptimized = pModule->IsIbcOptimized(); } + BOOL bIsReadyToRun = pModule->IsReadyToRun(); ULONG ulReservedFlags = 0; ULONG ulFlags = ((bIsDomainNeutral ? ETW::LoaderLog::LoaderStructs::DomainNeutralModule : 0) | (bHasNativeImage ? ETW::LoaderLog::LoaderStructs::NativeModule : 0) | (bIsDynamicAssembly ? ETW::LoaderLog::LoaderStructs::DynamicModule : 0) | (bIsManifestModule ? ETW::LoaderLog::LoaderStructs::ManifestModule : 0) | - (bIsIbcOptimized ? ETW::LoaderLog::LoaderStructs::IbcOptimized : 0)); + (bIsIbcOptimized ? ETW::LoaderLog::LoaderStructs::IbcOptimized : 0) | + (bIsReadyToRun ? ETW::LoaderLog::LoaderStructs::ReadyToRunModule : 0)); // Grab PDB path, guid, and age for managed PDB and native (NGEN) PDB when // available. Any failures are not fatal. The corresponding PDB info will remain @@ -6318,7 +6322,7 @@ VOID ETW::MethodLog::SendMethodJitStartEvent(MethodDesc *pMethodDesc, SString *n /****************************************************************************/ /* This routine is used to send a method load/unload or rundown event */ /****************************************************************************/ -VOID ETW::MethodLog::SendMethodEvent(MethodDesc *pMethodDesc, DWORD dwEventOptions, BOOL bIsJit, SString *namespaceOrClassName, SString *methodName, SString *methodSignature, SIZE_T pCode, ReJITID rejitID) +VOID ETW::MethodLog::SendMethodEvent(MethodDesc *pMethodDesc, DWORD dwEventOptions, BOOL bIsJit, SString *namespaceOrClassName, SString *methodName, SString *methodSignature, SIZE_T pCode, ReJITID rejitID, BOOL bProfilerRejectedPrecompiledCode, BOOL bReadyToRunRejectedPrecompiledCode) { CONTRACTL { THROWS; @@ -6392,7 +6396,9 @@ VOID ETW::MethodLog::SendMethodEvent(MethodDesc *pMethodDesc, DWORD dwEventOptio (bHasSharedGenericCode ? ETW::MethodLog::MethodStructs::SharedGenericCode : 0) | (bIsGenericMethod ? ETW::MethodLog::MethodStructs::GenericMethod : 0) | (bIsDynamicMethod ? ETW::MethodLog::MethodStructs::DynamicMethod : 0) | - (bIsJit ? ETW::MethodLog::MethodStructs::JittedMethod : 0))); + (bIsJit ? ETW::MethodLog::MethodStructs::JittedMethod : 0) | + (bProfilerRejectedPrecompiledCode ? ETW::MethodLog::MethodStructs::ProfilerRejectedPrecompiledCode : 0) | + (bReadyToRunRejectedPrecompiledCode ? ETW::MethodLog::MethodStructs::ReadyToRunRejectedPrecompiledCode : 0))); // Intentionally set the extent flags (cold vs. hot) only after all the other common // flags (above) have been set. |