src: Name all the timeouts and idles
https://bugzilla.gnome.org/show_bug.cgi?id=727983
This commit is contained in:
parent
e8fd8b58d0
commit
85f811f147
@ -369,6 +369,7 @@ backend_died_cb (EClient *client, CalendarSourceData *source_data)
|
|||||||
|
|
||||||
source_data->timeout_id = g_timeout_add_seconds (2, backend_restart,
|
source_data->timeout_id = g_timeout_add_seconds (2, backend_restart,
|
||||||
source_data);
|
source_data);
|
||||||
|
g_source_set_name_by_id (source_data->timeout_id, "[gnome-shell] backend_restart");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -537,6 +537,7 @@ app_schedule_changed (App *app)
|
|||||||
app->changed_timeout_id = g_timeout_add (2000,
|
app->changed_timeout_id = g_timeout_add (2000,
|
||||||
on_app_schedule_changed_cb,
|
on_app_schedule_changed_cb,
|
||||||
app);
|
app);
|
||||||
|
g_source_set_name_by_id (app->changed_timeout_id, "[gnome-shell] on_app_schedule_changed_cb");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ ensure_autoquit_on (void)
|
|||||||
autoquit_id =
|
autoquit_id =
|
||||||
g_timeout_add_seconds (AUTOQUIT_TIMEOUT,
|
g_timeout_add_seconds (AUTOQUIT_TIMEOUT,
|
||||||
autoquit_timeout_cb, NULL);
|
autoquit_timeout_cb, NULL);
|
||||||
|
g_source_set_name_by_id (autoquit_id, "[gnome-shell] autoquit_timeout_cb");
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -590,6 +590,7 @@ shell_mime_sniffer_sniff_async (ShellMimeSniffer *self,
|
|||||||
self->priv->watchdog_id =
|
self->priv->watchdog_id =
|
||||||
g_timeout_add (WATCHDOG_TIMEOUT,
|
g_timeout_add (WATCHDOG_TIMEOUT,
|
||||||
watchdog_timeout_reached_cb, self);
|
watchdog_timeout_reached_cb, self);
|
||||||
|
g_source_set_name_by_id (self->priv->watchdog_id, "[gnome-shell] watchdog_timeout_reached_cb");
|
||||||
|
|
||||||
start_loading_file (self);
|
start_loading_file (self);
|
||||||
}
|
}
|
||||||
|
@ -567,6 +567,7 @@ ensure_queued_save (ShellAppUsage *self)
|
|||||||
if (self->save_id != 0)
|
if (self->save_id != 0)
|
||||||
return;
|
return;
|
||||||
self->save_id = g_timeout_add_seconds (SAVE_APPS_TIMEOUT_SECONDS, idle_save_application_usage, self);
|
self->save_id = g_timeout_add_seconds (SAVE_APPS_TIMEOUT_SECONDS, idle_save_application_usage, self);
|
||||||
|
g_source_set_name_by_id (self->save_id, "[gnome-shell] idle_save_application_usage");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clean up apps we see rarely.
|
/* Clean up apps we see rarely.
|
||||||
|
@ -1434,9 +1434,12 @@ schedule_leisure_functions (ShellGlobal *global)
|
|||||||
* in another thread.
|
* in another thread.
|
||||||
*/
|
*/
|
||||||
if (!global->leisure_function_id)
|
if (!global->leisure_function_id)
|
||||||
global->leisure_function_id = g_idle_add_full (G_PRIORITY_LOW,
|
{
|
||||||
run_leisure_functions,
|
global->leisure_function_id = g_idle_add_full (G_PRIORITY_LOW,
|
||||||
global, NULL);
|
run_leisure_functions,
|
||||||
|
global, NULL);
|
||||||
|
g_source_set_name_by_id (global->leisure_function_id, "[gnome-shell] run_leisure_functions");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,6 +81,7 @@ establish_timeout ()
|
|||||||
g_source_remove (timeout_id);
|
g_source_remove (timeout_id);
|
||||||
|
|
||||||
timeout_id = g_timeout_add (opt_idle_timeout * 1000, on_timeout, NULL);
|
timeout_id = g_timeout_add (opt_idle_timeout * 1000, on_timeout, NULL);
|
||||||
|
g_source_set_name_by_id (timeout_id, "[gnome-shell] on_timeout");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -223,6 +223,7 @@ shell_perf_log_set_enabled (ShellPerfLog *perf_log,
|
|||||||
perf_log->statistics_timeout_id = g_timeout_add (STATISTIC_COLLECTION_INTERVAL_MS,
|
perf_log->statistics_timeout_id = g_timeout_add (STATISTIC_COLLECTION_INTERVAL_MS,
|
||||||
statistics_timeout,
|
statistics_timeout,
|
||||||
perf_log);
|
perf_log);
|
||||||
|
g_source_set_name_by_id (perf_log->statistics_timeout_id, "[gnome-shell] statistics_timeout");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -300,11 +300,14 @@ on_request_cancelled (GCancellable *cancellable,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
AuthRequest *request = user_data;
|
AuthRequest *request = user_data;
|
||||||
|
guint id;
|
||||||
|
|
||||||
/* post-pone to idle to handle GCancellable deadlock in
|
/* post-pone to idle to handle GCancellable deadlock in
|
||||||
*
|
*
|
||||||
* https://bugzilla.gnome.org/show_bug.cgi?id=642968
|
* https://bugzilla.gnome.org/show_bug.cgi?id=642968
|
||||||
*/
|
*/
|
||||||
g_idle_add (handle_cancelled_in_idle, request);
|
id = g_idle_add (handle_cancelled_in_idle, request);
|
||||||
|
g_source_set_name_by_id (id, "[gnome-shell] handle_cancelled_in_idle");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -78,7 +78,10 @@ shell_recorder_src_update_memory_used (ShellRecorderSrc *src,
|
|||||||
g_mutex_lock (src->mutex);
|
g_mutex_lock (src->mutex);
|
||||||
src->memory_used += delta;
|
src->memory_used += delta;
|
||||||
if (src->memory_used_update_idle == 0)
|
if (src->memory_used_update_idle == 0)
|
||||||
src->memory_used_update_idle = g_idle_add (shell_recorder_src_memory_used_update_idle, src);
|
{
|
||||||
|
src->memory_used_update_idle = g_idle_add (shell_recorder_src_memory_used_update_idle, src);
|
||||||
|
g_source_set_name_by_id (src->memory_used_update_idle, "[gnome-shell] shell_recorder_src_memory_used_update_idle");
|
||||||
|
}
|
||||||
g_mutex_unlock (src->mutex);
|
g_mutex_unlock (src->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,6 +311,7 @@ recorder_add_redraw_timeout (ShellRecorder *recorder)
|
|||||||
recorder->redraw_timeout = g_timeout_add (MAXIMUM_PAUSE_TIME,
|
recorder->redraw_timeout = g_timeout_add (MAXIMUM_PAUSE_TIME,
|
||||||
recorder_redraw_timeout,
|
recorder_redraw_timeout,
|
||||||
recorder);
|
recorder);
|
||||||
|
g_source_set_name_by_id (recorder->redraw_timeout, "[gnome-shell] recorder_redraw_timeout");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -533,8 +534,11 @@ recorder_queue_redraw (ShellRecorder *recorder)
|
|||||||
* we need to queue a "low priority redraw" after timeline updates
|
* we need to queue a "low priority redraw" after timeline updates
|
||||||
*/
|
*/
|
||||||
if (recorder->state == RECORDER_STATE_RECORDING && recorder->redraw_idle == 0)
|
if (recorder->state == RECORDER_STATE_RECORDING && recorder->redraw_idle == 0)
|
||||||
recorder->redraw_idle = g_idle_add_full (CLUTTER_PRIORITY_REDRAW + 1,
|
{
|
||||||
recorder_idle_redraw, recorder, NULL);
|
recorder->redraw_idle = g_idle_add_full (CLUTTER_PRIORITY_REDRAW + 1,
|
||||||
|
recorder_idle_redraw, recorder, NULL);
|
||||||
|
g_source_set_name_by_id (recorder->redraw_idle, "[gnome-shell] recorder_idle_redraw");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -720,9 +724,12 @@ static void
|
|||||||
recorder_add_update_pointer_timeout (ShellRecorder *recorder)
|
recorder_add_update_pointer_timeout (ShellRecorder *recorder)
|
||||||
{
|
{
|
||||||
if (!recorder->update_pointer_timeout)
|
if (!recorder->update_pointer_timeout)
|
||||||
recorder->update_pointer_timeout = g_timeout_add (UPDATE_POINTER_TIME,
|
{
|
||||||
recorder_update_pointer_timeout,
|
recorder->update_pointer_timeout = g_timeout_add (UPDATE_POINTER_TIME,
|
||||||
recorder);
|
recorder_update_pointer_timeout,
|
||||||
|
recorder);
|
||||||
|
g_source_set_name_by_id (recorder->update_pointer_timeout, "[gnome-shell] recorder_update_pointer_timeout");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1336,9 +1343,12 @@ recorder_pipeline_on_memory_used_changed (ShellRecorderSrc *src,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (recorder->update_memory_used_timeout == 0)
|
if (recorder->update_memory_used_timeout == 0)
|
||||||
recorder->update_memory_used_timeout = g_timeout_add (UPDATE_MEMORY_USED_DELAY,
|
{
|
||||||
recorder_update_memory_used_timeout,
|
recorder->update_memory_used_timeout = g_timeout_add (UPDATE_MEMORY_USED_DELAY,
|
||||||
recorder);
|
recorder_update_memory_used_timeout,
|
||||||
|
recorder);
|
||||||
|
g_source_set_name_by_id (recorder->update_memory_used_timeout, "[gnome-shell] recorder_update_memory_used_timeout");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -692,6 +692,7 @@ trough_paging_cb (StScrollBar *self)
|
|||||||
PAGING_INITIAL_REPEAT_TIMEOUT,
|
PAGING_INITIAL_REPEAT_TIMEOUT,
|
||||||
(GSourceFunc) trough_paging_cb,
|
(GSourceFunc) trough_paging_cb,
|
||||||
self);
|
self);
|
||||||
|
g_source_set_name_by_id (self->priv->paging_source_id, "[gnome-shell] trough_paging_cb");
|
||||||
}
|
}
|
||||||
else if (self->priv->paging_event_no == 1)
|
else if (self->priv->paging_event_no == 1)
|
||||||
{
|
{
|
||||||
@ -703,6 +704,7 @@ trough_paging_cb (StScrollBar *self)
|
|||||||
PAGING_SUBSEQUENT_REPEAT_TIMEOUT,
|
PAGING_SUBSEQUENT_REPEAT_TIMEOUT,
|
||||||
(GSourceFunc) trough_paging_cb,
|
(GSourceFunc) trough_paging_cb,
|
||||||
self);
|
self);
|
||||||
|
g_source_set_name_by_id (self->priv->paging_source_id, "[gnome-shell] trough_paging_cb");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -246,12 +246,15 @@ static void
|
|||||||
on_icon_theme_changed (StTextureCache *cache,
|
on_icon_theme_changed (StTextureCache *cache,
|
||||||
StThemeContext *context)
|
StThemeContext *context)
|
||||||
{
|
{
|
||||||
|
guint id;
|
||||||
|
|
||||||
/* Note that an icon theme change isn't really a change of the StThemeContext;
|
/* Note that an icon theme change isn't really a change of the StThemeContext;
|
||||||
* the style information has changed. But since the style factors into the
|
* the style information has changed. But since the style factors into the
|
||||||
* icon_name => icon lookup, faking a theme context change is a good way
|
* icon_name => icon lookup, faking a theme context change is a good way
|
||||||
* to force users such as StIcon to look up icons again.
|
* to force users such as StIcon to look up icons again.
|
||||||
*/
|
*/
|
||||||
g_idle_add ((GSourceFunc) changed_idle, context);
|
id = g_idle_add ((GSourceFunc) changed_idle, context);
|
||||||
|
g_source_set_name_by_id (id, "[gnome-shell] changed_idle");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user