Move MetaProfiler from the backend to core

It's not really a backend thing, and we'll want to profile e.g. loading
the backend too, so create it very early and destroy it very late and
let MetaContextMain own it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2678>
This commit is contained in:
Jonas Ådahl
2022-10-12 22:30:07 +02:00
committed by Marge Bot
parent 50288d1ead
commit ca2057da9a
6 changed files with 20 additions and 20 deletions

View File

@ -74,10 +74,6 @@
#include "meta/meta-enum-types.h"
#include "meta/util.h"
#ifdef HAVE_PROFILER
#include "backends/meta-profiler.h"
#endif
#ifdef HAVE_REMOTE_DESKTOP
#include "backends/meta-dbus-session-watcher.h"
#include "backends/meta-remote-access-controller-private.h"
@ -158,10 +154,6 @@ struct _MetaBackendPrivate
MetaRemoteDesktop *remote_desktop;
#endif
#ifdef HAVE_PROFILER
MetaProfiler *profiler;
#endif
#ifdef HAVE_LIBWACOM
WacomDeviceDatabase *wacom_db;
#endif
@ -262,10 +254,6 @@ meta_backend_dispose (GObject *object)
g_clear_object (&priv->settings);
#ifdef HAVE_PROFILER
g_clear_object (&priv->profiler);
#endif
g_clear_pointer (&priv->default_seat, clutter_seat_destroy);
g_clear_pointer (&priv->stage, clutter_actor_destroy);
g_clear_pointer (&priv->idle_manager, meta_idle_manager_free);
@ -1220,10 +1208,6 @@ meta_backend_initable_init (GInitable *initable,
system_bus_gotten_cb,
backend);
#ifdef HAVE_PROFILER
priv->profiler = meta_profiler_new ();
#endif
if (!init_clutter (backend, error))
return FALSE;