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

@ -28,6 +28,10 @@
#include "meta/meta-context.h"
#include "wayland/meta-wayland-types.h"
#ifdef HAVE_PROFILER
#include "core/meta-profiler.h"
#endif
struct _MetaContextClass
{
GObjectClass parent_class;
@ -79,4 +83,9 @@ META_EXPORT_TEST
gboolean meta_context_is_x11_sync (MetaContext *context);
#endif
#ifdef HAVE_PROFILER
MetaProfiler *
meta_context_get_profiler (MetaContext *context);
#endif
#endif /* META_CONTEXT_PRIVATE_H */