From ff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 11 Jul 2016 17:06:15 +0200 Subject: 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 --- src/gpm-dpms.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gpm-dpms.c') diff --git a/src/gpm-dpms.c b/src/gpm-dpms.c index 644ffe7..bb1e718 100644 --- a/src/gpm-dpms.c +++ b/src/gpm-dpms.c @@ -301,6 +301,7 @@ gpm_dpms_init (GpmDpms *dpms) dpms->priv->display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default()); dpms->priv->dpms_capable = DPMSCapable (dpms->priv->display); dpms->priv->timer_id = g_timeout_add_seconds (GPM_DPMS_POLL_TIME, (GSourceFunc)gpm_dpms_poll_mode_cb, dpms); + g_source_set_name_by_id (dpms->priv->timer_id, "[GpmDpms] poll"); /* ensure we clear the default timeouts (Standby: 1200s, Suspend: 1800s, Off: 2400s) */ gpm_dpms_clear_timeouts (dpms); -- cgit v1.2.1