Thanks to visit codestin.com
Credit goes to github.com

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
6 changes: 6 additions & 0 deletions mono/metadata/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,12 @@ mono_domain_free (MonoDomain *domain, gboolean force)
g_slist_free (domain->domain_assemblies);
domain->domain_assemblies = NULL;

/*
* Send this after the assemblies have been unloaded and the domain is still in a
* usable state.
*/
mono_profiler_appdomain_event (domain, MONO_PROFILE_END_UNLOAD);

if (free_domain_hook)
free_domain_hook (domain);

Expand Down
2 changes: 0 additions & 2 deletions mono/metadata/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,6 @@ mono_domain_finalize (MonoDomain *domain, guint32 timeout)
mono_gc_finalize_threadpool_threads ();
}

mono_profiler_appdomain_event (domain, MONO_PROFILE_END_UNLOAD);

done:
if (InterlockedDecrement (&req->ref) == 0) {
mono_coop_sem_destroy (&req->done);
Expand Down
2 changes: 1 addition & 1 deletion mono/metadata/profiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ mono_profiler_install_gc_finalize (MonoProfileGCFinalizeFunc begin, MonoProfileG

prof_list->gc_finalize_begin = begin;
prof_list->gc_finalize_object_begin = begin_obj;
prof_list->gc_finalize_object_begin = end_obj;
prof_list->gc_finalize_object_end = end_obj;
prof_list->gc_finalize_end = end;
}

Expand Down