クロスコア コンテキスト スイッチの原因となっているスレッドと、同期がとられているスレッドを特定するにはどうすればよいでしょうか?
(PS: Visual Studio のこの部分は初めてです...学習しながら、ヒントをいただければ幸いです!)
同期に最も多くの時間を費やすスレッドのさまざまなスタック トレースがあり、その理由はわかりません。
スレッド 12384
Category = Synchronization Delay = 650947.5375 ms
ntoskrnl.exe!SwapContext_PatchXRstor ntoskrnl.exe!KiSwapContext
ntoskrnl.exe!KiCommitThreadWait ntoskrnl.exe!KeWaitForSingleObject
ntoskrnl.exe!NtWaitForSingleObject ntoskrnl.exe!KiSystemServiceCopyEnd
スレッド 8792
Category = Synchronization API = WaitForMultipleObjects
Delay = 8993.9801 ms Unblocked by thread 3052; click 'Unblocking
Stack' for details. kernel32.dll!_WaitForMultipleObjects@16
clr.dll!WKS::WaitForFinalizerEvent
clr.dll!WKS::GCHeap::FinalizerThreadWorker
clr.dll!Thread::DoExtraWorkForFinalizer
clr.dll!Thread::ShouldChangeAbortToUnload
clr.dll!Thread::ShouldChangeAbortToUnload
clr.dll!ManagedThreadBase_NoADTransition
clr.dll!ManagedThreadBase::FinalizerBase
clr.dll!WKS::GCHeap::FinalizerThreadStart
clr.dll!Thread::intermediateThreadProc
kernel32.dll!@BaseThreadInitThunk@12 ntdll.dll!___RtlUserThreadStart@8
ntdll.dll!__RtlUserThreadStart@8
The Unblocking stack for the above is
Thread 8792 was unblocked by thread 3052 The unblocking call stack
follows: ntoskrnl.exe! ?? ?? ::FNODOBFM::`string'
ntoskrnl.exe!NtSetEvent ntoskrnl.exe!KiSystemServiceCopyEnd
wow64cpu.dll!CpupSyscallStub wow64cpu.dll!Thunk0Arg
wow64.dll!RunCpuSimulation wow64.dll!Wow64LdrpInitialize ntdll.dll! ??
?? ::FNODOBFM::`string' ntdll.dll!LdrInitializeThunk
ntdll.dll!_ZwSetEvent@8 kernelbase.dll!_SetEvent@4
clr.dll!CLREvent::Set clr.dll!WKS::gc_heap::try_allocate_more_space
clr.dll!WKS::gc_heap::allocate_more_space clr.dll!WKS::GCHeap::Alloc
clr.dll!Alloc clr.dll!FastAllocatePrimitiveArray clr.dll!JIT_NewArr1
mscorlib.ni.dll![mscorlib.dll] mscorlib.ni.dll![mscorlib.dll]
mscorlib.ni.dll![mscorlib.dll] mscorlib.ni.dll![mscorlib.dll]
!0x206b89 system.core.ni.dll![<Unknown>]
system.core.ni.dll![<Unknown>] system.core.ni.dll![<Unknown>]