[glib] gio: Add names to idles and timeouts
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: Add names to idles and timeouts
- Date: Fri, 28 Mar 2014 00:51:07 +0000 (UTC)
commit 8792609e15394967cab526838b83f90acb401663
Author: Bastien Nocera <hadess hadess net>
Date: Sat Mar 22 13:15:45 2014 +0100
gio: Add names to idles and timeouts
This isn't too useful for some of the "return result in idle"
functions, but it's better than nothing.
https://bugzilla.gnome.org/show_bug.cgi?id=726872
gio/gactiongroupexporter.c | 1 +
gio/gappinfo.c | 1 +
gio/gdbus-2.0/codegen/codegen.py | 3 ++-
gio/gdbusconnection.c | 11 +++++++++++
gio/gdbusnameowning.c | 1 +
gio/gdbusnamewatching.c | 1 +
gio/gdbusprivate.c | 3 +++
gio/gdbusserver.c | 1 +
gio/gfilemonitor.c | 1 +
gio/gioscheduler.c | 2 ++
gio/gnetworkmonitorbase.c | 1 +
gio/gsimpleasyncresult.c | 2 ++
gio/gtask.c | 1 +
13 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/gio/gactiongroupexporter.c b/gio/gactiongroupexporter.c
index 2e045ed..451c81c 100644
--- a/gio/gactiongroupexporter.c
+++ b/gio/gactiongroupexporter.c
@@ -238,6 +238,7 @@ g_action_group_exporter_set_events (GActionGroupExporter *exporter,
source = g_idle_source_new ();
exporter->pending_source = source;
g_source_set_callback (source, g_action_group_exporter_dispatch_events, exporter, NULL);
+ g_source_set_name (source, "[gio] g_action_group_exporter_dispatch_events");
g_source_attach (source, exporter->context);
g_source_unref (source);
}
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
index 474f342..f1c4f88 100644
--- a/gio/gappinfo.c
+++ b/gio/gappinfo.c
@@ -1238,6 +1238,7 @@ g_app_info_monitor_fire (void)
idle = g_idle_source_new ();
g_source_set_callback (idle, g_app_info_monitor_emit, context, NULL);
+ g_source_set_name (idle, "[gio] g_app_info_monitor_emit");
g_source_attach (idle, context);
g_source_unref (idle);
}
diff --git a/gio/gdbus-2.0/codegen/codegen.py b/gio/gdbus-2.0/codegen/codegen.py
index 43a6837..3858bcf 100644
--- a/gio/gdbus-2.0/codegen/codegen.py
+++ b/gio/gdbus-2.0/codegen/codegen.py
@@ -2520,13 +2520,14 @@ class CodeGenerator:
' skeleton->priv->changed_properties_idle_source = g_idle_source_new ();\n'
' g_source_set_priority (skeleton->priv->changed_properties_idle_source,
G_PRIORITY_DEFAULT);\n'
' g_source_set_callback (skeleton->priv->changed_properties_idle_source,
_%s_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);\n'
+ ' g_source_set_name (skeleton->priv->changed_properties_idle_source,
"[generated] _%s_emit_changed");\n'
' g_source_attach (skeleton->priv->changed_properties_idle_source,
skeleton->priv->context);\n'
' g_source_unref (skeleton->priv->changed_properties_idle_source);\n'
' }\n'
' g_mutex_unlock (&skeleton->priv->lock);\n'
'}\n'
'\n'
- %(i.name_lower, i.camel_name, i.ns_upper, i.name_upper, i.name_lower))
+ %(i.name_lower, i.camel_name, i.ns_upper, i.name_upper, i.name_lower, i.name_lower))
self.c.write('static void\n'
'%s_skeleton_set_property (GObject *object,\n'
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index fc9acbe..5969a01 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -281,6 +281,7 @@ call_destroy_notify (GMainContext *context,
call_destroy_notify_data_in_idle,
data,
(GDestroyNotify) call_destroy_notify_data_free);
+ g_source_set_name (idle_source, "[gio] call_destroy_notify_data_in_idle");
g_source_attach (idle_source, data->context);
g_source_unref (idle_source);
@@ -1415,6 +1416,7 @@ schedule_closed_unlocked (GDBusConnection *connection,
emit_closed_in_idle,
data,
(GDestroyNotify) emit_closed_data_free);
+ g_source_set_name (idle_source, "[gio] emit_closed_in_idle");
g_source_attach (idle_source, connection->main_context_at_construction);
g_source_unref (idle_source);
}
@@ -1917,6 +1919,7 @@ send_message_with_reply_cancelled_cb (GCancellable *cancellable,
send_message_with_reply_cancelled_idle_cb,
send_message_data_ref (data),
(GDestroyNotify) send_message_data_unref);
+ g_source_set_name (idle_source, "[gio] send_message_with_reply_cancelled_idle_cb");
g_source_attach (idle_source, data->main_context);
g_source_unref (idle_source);
}
@@ -3902,6 +3905,7 @@ schedule_callbacks (GDBusConnection *connection,
emit_signal_instance_in_idle_cb,
signal_instance,
(GDestroyNotify) signal_instance_free);
+ g_source_set_name (idle_source, "[gio] emit_signal_instance_in_idle_cb");
g_source_attach (idle_source, subscriber->context);
g_source_unref (idle_source);
}
@@ -4392,6 +4396,10 @@ validate_and_maybe_schedule_property_getset (GDBusConnection *connect
is_get ? invoke_get_property_in_idle_cb : invoke_set_property_in_idle_cb,
property_data,
(GDestroyNotify) property_data_free);
+ if (is_get)
+ g_source_set_name (idle_source, "[gio] invoke_get_property_in_idle_cb");
+ else
+ g_source_set_name (idle_source, "[gio] invoke_set_property_in_idle_cb");
g_source_attach (idle_source, main_context);
g_source_unref (idle_source);
@@ -4609,6 +4617,7 @@ validate_and_maybe_schedule_property_get_all (GDBusConnection *connec
invoke_get_all_properties_in_idle_cb,
property_get_all_data,
(GDestroyNotify) property_get_all_data_free);
+ g_source_set_name (idle_source, "[gio] invoke_get_all_properties_in_idle_cb");
g_source_attach (idle_source, main_context);
g_source_unref (idle_source);
@@ -4925,6 +4934,7 @@ schedule_method_call (GDBusConnection *connection,
call_in_idle_cb,
invocation,
g_object_unref);
+ g_source_set_name (idle_source, "[gio] call_in_idle_cb");
g_source_attach (idle_source, main_context);
g_source_unref (idle_source);
}
@@ -6500,6 +6510,7 @@ subtree_message_func (GDBusConnection *connection,
process_subtree_vtable_message_in_idle_cb,
data,
(GDestroyNotify) subtree_deferred_data_free);
+ g_source_set_name (idle_source, "[gio] process_subtree_vtable_message_in_idle_cb");
g_source_attach (idle_source, es->context);
g_source_unref (idle_source);
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index cf7a4fe..cb7cb09 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -197,6 +197,7 @@ schedule_call_in_idle (Client *client, CallType call_type)
call_in_idle_cb,
data,
(GDestroyNotify) call_handler_data_free);
+ g_source_set_name (idle_source, "[gio] call_in_idle_cb");
g_source_attach (idle_source, client->main_context);
g_source_unref (idle_source);
}
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index 79b4f8e..adf53c3 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -198,6 +198,7 @@ schedule_call_in_idle (Client *client, CallType call_type)
call_in_idle_cb,
data,
(GDestroyNotify) call_handler_data_free);
+ g_source_set_name (idle_source, "[gio] call_in_idle_cb");
g_source_attach (idle_source, client->main_context);
g_source_unref (idle_source);
}
diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
index 762e676..86a9d94 100644
--- a/gio/gdbusprivate.c
+++ b/gio/gdbusprivate.c
@@ -554,6 +554,7 @@ _g_dbus_worker_unfreeze (GDBusWorker *worker)
unfreeze_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
+ g_source_set_name (idle_source, "[gio] unfreeze_in_idle_cb");
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
}
@@ -1596,6 +1597,7 @@ schedule_writing_unlocked (GDBusWorker *worker,
continue_writing_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
+ g_source_set_name (idle_source, "[gio] continue_writing_in_idle_cb");
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
}
@@ -1681,6 +1683,7 @@ _g_dbus_worker_new (GIOStream *stream,
_g_dbus_worker_do_initial_read,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
+ g_source_set_name (idle_source, "[gio] _g_dbus_worker_do_initial_read");
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index 7991061..cf82130 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -1012,6 +1012,7 @@ on_run (GSocketService *service,
emit_new_connection_in_idle,
data,
(GDestroyNotify) emit_idle_data_free);
+ g_source_set_name (idle_source, "[gio] emit_new_connection_in_idle");
g_source_attach (idle_source, server->main_context_at_construction);
g_source_unref (idle_source);
}
diff --git a/gio/gfilemonitor.c b/gio/gfilemonitor.c
index 136006f..c81f6fc 100644
--- a/gio/gfilemonitor.c
+++ b/gio/gfilemonitor.c
@@ -443,6 +443,7 @@ emit_in_idle (GFileMonitor *monitor,
* pending idles.
*/
g_source_set_callback (source, emit_cb, monitor, NULL);
+ g_source_set_name (source, "[gio] emit_cb");
g_source_attach (source, monitor->priv->context);
}
/* We reverse this in the processor */
diff --git a/gio/gioscheduler.c b/gio/gioscheduler.c
index 49027cb..4c826c6 100644
--- a/gio/gioscheduler.c
+++ b/gio/gioscheduler.c
@@ -258,6 +258,7 @@ g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, mainloop_proxy_func, proxy,
NULL);
+ g_source_set_name (source, "[gio] mainloop_proxy_func");
g_source_attach (source, job->context);
g_source_unref (source);
@@ -314,6 +315,7 @@ g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job,
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, mainloop_proxy_func, proxy,
(GDestroyNotify)mainloop_proxy_free);
+ g_source_set_name (source, "[gio] mainloop_proxy_func");
g_source_attach (source, job->context);
g_source_unref (source);
diff --git a/gio/gnetworkmonitorbase.c b/gio/gnetworkmonitorbase.c
index c14e264..ead9e64 100644
--- a/gio/gnetworkmonitorbase.c
+++ b/gio/gnetworkmonitorbase.c
@@ -379,6 +379,7 @@ queue_network_changed (GNetworkMonitorBase *monitor)
*/
g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
g_source_set_callback (source, emit_network_changed, monitor, NULL);
+ g_source_set_name (source, "[gio] emit_network_changed");
g_source_attach (source, monitor->priv->context);
monitor->priv->network_changed_source = source;
}
diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c
index ee30da2..5d43ad4 100644
--- a/gio/gsimpleasyncresult.c
+++ b/gio/gsimpleasyncresult.c
@@ -801,6 +801,7 @@ g_simple_async_result_complete_in_idle (GSimpleAsyncResult *simple)
source = g_idle_source_new ();
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, complete_in_idle_cb, simple, g_object_unref);
+ g_source_set_name (source, "[gio] complete_in_idle_cb");
g_source_attach (source, simple->context);
g_source_unref (source);
@@ -861,6 +862,7 @@ run_in_thread (GIOSchedulerJob *job,
source = g_idle_source_new ();
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, complete_in_idle_cb_for_thread, data, NULL);
+ g_source_set_name (source, "[gio] complete_in_idle_cb_for_thread");
g_source_attach (source, simple->context);
g_source_unref (source);
diff --git a/gio/gtask.c b/gio/gtask.c
index f57080b..30d36ae 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -1135,6 +1135,7 @@ g_task_return (GTask *task,
/* Otherwise, complete in the next iteration */
source = g_idle_source_new ();
g_task_attach_source (task, source, complete_in_idle_cb);
+ g_source_set_name (source, "[gio] complete_in_idle_cb");
g_source_unref (source);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]