Closed
Description
DevDiv workitem: https://devdiv.visualstudio.com/defaultcollection/DevDiv/_workitems/edit/125447/
From @jkotas in an internal email thread:
Right now, the list is manipulated in preemptive mode (AppDomain::AddAssembly / RemoveAssembly has MODE_ANY contract), so I do not think we can just remove this lock during GC. However, if we can change the code to always manipulate the list in cooperative mode, the lock can be removed during GC.
We should opened a bug on it, so that somebody looks into it in more details.
-Jan
Callstack causing the performance problem
|+ clr!CrstBase::Enter
| + clr!CrstBase::CrstHolder::CrstHolder
| |+ clr!AppDomain::AssemblyIterator::Next
| ||+ clr!AppDomain::EnumStaticGCRefs
| || + clr!SystemDomain::EnumAllStaticGCRefs
| || + clr!CNameSpace::GcScanRoots
| || + clr!SVR::gc_heap::background_mark_phase
| || |+ clr!SVR::gc_heap::gc1
| || | + clr!SVR::gc_heap::bgc_thread_function
| || | + clr!Thread::intermediateThreadProc
| || | + kernel32!BaseThreadInitThunk
| || | + ntdll!RtlUserThreadStart