diff options
author | raveit65 <[email protected]> | 2016-07-11 17:06:15 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-07-25 16:13:41 +0200 |
commit | ff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc (patch) | |
tree | a7ea4da804c5143462cc6df8d9176d91b7737889 /src/gpm-engine.c | |
parent | 85afd16cee70390540d73e0b66999b0d859d299e (diff) | |
download | mate-power-manager-ff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc.tar.bz2 mate-power-manager-ff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc.tar.xz |
Assign names to our idle sources when using newer versions of glib2
This makes it possible to profile more accurately using systemtap
taken from:
https://git.gnome.org/browse/gnome-power-manager/commit/?id=fbb075b5
Diffstat (limited to 'src/gpm-engine.c')
-rw-r--r-- | src/gpm-engine.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpm-engine.c b/src/gpm-engine.c index 611ccf5..022916e 100644 --- a/src/gpm-engine.c +++ b/src/gpm-engine.c @@ -1159,6 +1159,7 @@ gpm_engine_init (GpmEngine *engine) GPtrArray *array = NULL; guint i; #endif + guint idle_id; engine->priv = GPM_ENGINE_GET_PRIVATE (engine); engine->priv->array = g_ptr_array_new_with_free_func (g_object_unref); @@ -1223,7 +1224,8 @@ gpm_engine_init (GpmEngine *engine) else egg_debug ("Using percentage notification policy"); - g_idle_add ((GSourceFunc) gpm_engine_coldplug_idle_cb, engine); + idle_id = g_idle_add ((GSourceFunc) gpm_engine_coldplug_idle_cb, engine); + g_source_set_name_by_id (idle_id, "[GpmEngine] coldplug"); } /** |