Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runtime/exports.t4
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
"MonoProfileThreadFunc", "end"
) {
XamarinRuntime = RuntimeMode.MonoVM,
Mode = DotNetMode.OnlyLegacy,
},

new Export ("void", "mono_profiler_install_gc",
Expand Down
5 changes: 5 additions & 0 deletions runtime/monovm-bridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
* and create a pool that spans the thread's entire lifetime.
*/

#if !DOTNET
static CFMutableDictionaryRef xamarin_thread_hash = NULL;
static pthread_mutex_t thread_hash_lock = PTHREAD_MUTEX_INITIALIZER;

Expand Down Expand Up @@ -296,14 +297,18 @@
// COOP: no managed memory access: any mode.
xamarin_thread_finish (NULL);
}
#endif // !DOTNET

void
xamarin_install_nsautoreleasepool_hooks ()
{
// No need to do anything here for CoreCLR.
#if !DOTNET
// COOP: executed at startup (and no managed memory access): any mode.
xamarin_thread_hash = CFDictionaryCreateMutable (kCFAllocatorDefault, 0, NULL, NULL);

mono_profiler_install_thread (thread_start, thread_end);
#endif // !DOTNET
}

void
Expand Down