profiler: Add API to register profiler threads

The registered threads will get tracing turned on when MetaProfiler is
started.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2998>
This commit is contained in:
Jonas Ådahl
2022-10-26 12:10:43 +02:00
committed by Marge Bot
parent dd3c1046c1
commit e16d683721
4 changed files with 126 additions and 0 deletions

View File

@ -284,6 +284,16 @@ meta_context_is_x11_sync (MetaContext *context)
}
#endif
#ifdef HAVE_PROFILER
MetaProfiler *
meta_context_get_profiler (MetaContext *context)
{
MetaContextPrivate *priv = meta_context_get_instance_private (context);
return priv->profiler;
}
#endif
static gboolean
meta_context_real_configure (MetaContext *context,
int *argc,