Skip to content

Commit

Permalink
Merge pull request mono/mono#3689 from alexrp/profiler-c9-fixes
Browse files Browse the repository at this point in the history
Profiler fixes for Cycle 9 (mono/mono#2)

Commit migrated from mono/mono@16e6b77
  • Loading branch information
alexrp committed Oct 2, 2016
2 parents 9665650 + 6b0f810 commit 6370826
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/mono/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 src/mono/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 src/mono/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

0 comments on commit 6370826

Please sign in to comment.