diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2018-10-04 10:18:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 10:18:23 +0200 |
commit | 11832401739148f1f1e9419cb51180ba5263a41b (patch) | |
tree | 91e81791918d307b0bc9f8255d022fd2fbfbd970 /src/vm/eventtrace.cpp | |
parent | 0068168531e849cbad8388f00f3f23e58d3a01b4 (diff) | |
download | coreclr-11832401739148f1f1e9419cb51180ba5263a41b.tar.gz coreclr-11832401739148f1f1e9419cb51180ba5263a41b.tar.bz2 coreclr-11832401739148f1f1e9419cb51180ba5263a41b.zip |
Remove AppDomain unload (#20250)
* Remove AppDomain unload
This change removes all code in AppDomain that's related to AppDomain
unloading which is obsolete in CoreCLR. It also removes all calls to the
removed methods.
In few places, I have made the change simpler by taking into account the
fact that there is always just one AppDomain.
Diffstat (limited to 'src/vm/eventtrace.cpp')
-rw-r--r-- | src/vm/eventtrace.cpp | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp index be83f1c7a4..6179b6c561 100644 --- a/src/vm/eventtrace.cpp +++ b/src/vm/eventtrace.cpp @@ -4804,20 +4804,17 @@ VOID ETW::LoaderLog::DomainUnload(AppDomain *pDomain) TRACE_LEVEL_INFORMATION, KEYWORDZERO)) { - if(!pDomain->NoAccessToHandleTable()) - { - DWORD enumerationOptions = ETW::EnumerationLog::GetEnumerationOptionsFromRuntimeKeywords(); - - // Domain unload also causes type unload events - if(ETW_TRACING_CATEGORY_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context, - TRACE_LEVEL_INFORMATION, - CLR_TYPE_KEYWORD)) - { - enumerationOptions |= ETW::EnumerationLog::EnumerationStructs::TypeUnload; - } + DWORD enumerationOptions = ETW::EnumerationLog::GetEnumerationOptionsFromRuntimeKeywords(); - ETW::EnumerationLog::EnumerationHelper(NULL, pDomain, enumerationOptions); + // Domain unload also causes type unload events + if(ETW_TRACING_CATEGORY_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context, + TRACE_LEVEL_INFORMATION, + CLR_TYPE_KEYWORD)) + { + enumerationOptions |= ETW::EnumerationLog::EnumerationStructs::TypeUnload; } + + ETW::EnumerationLog::EnumerationHelper(NULL, pDomain, enumerationOptions); } } EX_CATCH { } EX_END_CATCH(SwallowAllExceptions); } @@ -7006,21 +7003,8 @@ VOID ETW::EnumerationLog::IterateAppDomain(AppDomain * pAppDomain, DWORD enumera // ensure the App Domain does not get finalized until we're all done SystemDomain::LockHolder lh; - if (pAppDomain->IsFinalized()) - { - return; - } - - // Since we're not FINALIZED yet, the handle table should remain intact, - // as should all type information in this AppDomain - _ASSERTE(!pAppDomain->NoAccessToHandleTable()); - // Now it's safe to do the iteration IterateDomain(pAppDomain, enumerationOptions); - - // Since we're holding the system domain lock, the AD type info should be - // there throughout the entire iteration we just did - _ASSERTE(!pAppDomain->NoAccessToHandleTable()); } /********************************************************************************/ |