forked from mono/mono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude the current thread when stopping the world if Instruments is …
…attached When Instruments is attached to profile memory usage, it injects liboainject.dylib into the target process. This replaces the default mmap/munmap with version that lock for statistics collection. This will result in deadlock within Mono when the GC stops the world to collect and attemps to mmap. There is an internal __OAExcludeMachThreadID method which adds/removes the passed in thread from the internal exclusion list and prevents Instruments from collecting statistics for that thread. We add the current thread to the exclusion list after we stop the world, then remove the current thread from the exclusion list when we resume.
- Loading branch information
1 parent
bf9064c
commit 3743e86
Showing
1 changed file
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters