Add check to prevent attaching a profiler when one is already present (dotnet/coreclr...
authorDavid Mason <davmason@microsoft.com>
Thu, 4 Jul 2019 00:15:47 +0000 (17:15 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Jul 2019 00:15:47 +0000 (17:15 -0700)
commit4e645e86f9ca479b98dbf63264d6886a728ffacc
tree3203d5827ac17c01555d7e0b285dca39b10692eb
parent5f9b394c54d349de2052d04aaa817be311077bd1
Add check to prevent attaching a profiler when one is already present (dotnet/coreclr#25520)

* Don't load multiple profilers

* add comment

* Move check to LoadProfiler, and eliminate race condition between attach profiler and startup profiled

Commit migrated from https://github.com/dotnet/coreclr/commit/1893a9c21d21a860094155b330efca9e598581d0
src/coreclr/src/inc/profilepriv.h
src/coreclr/src/vm/profilerdiagnosticprotocolhelper.cpp
src/coreclr/src/vm/profilinghelper.cpp
src/coreclr/src/vm/profilinghelper.h