Blame SOURCES/0003-Engine-add-g_debug-statements-in-state-changing-inte.patch

545ecd
From d970e6a07e82449c7d93b0314403af321230e081 Mon Sep 17 00:00:00 2001
545ecd
From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
545ecd
Date: Wed, 25 Jul 2018 22:52:49 +1000
545ecd
Subject: [PATCH 3/5] Engine: add g_debug statements in state changing
545ecd
 interface functions
545ecd
545ecd
---
545ecd
 engine/dconf-engine.c            | 10 +++++++++-
545ecd
 gsettings/dconfsettingsbackend.c |  1 +
545ecd
 2 files changed, 10 insertions(+), 1 deletion(-)
545ecd
545ecd
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
545ecd
index 1963c34..2911724 100644
545ecd
--- a/engine/dconf-engine.c
545ecd
+++ b/engine/dconf-engine.c
545ecd
@@ -928,11 +928,13 @@ dconf_engine_watch_established (DConfEngine  *engine,
545ecd
        * everything under the path being watched changed.  This case is
545ecd
        * very rare, anyway...
545ecd
        */
545ecd
+      g_debug ("SHM invalidated while establishing subscription to %s - signalling change", ow->path);
545ecd
       dconf_engine_change_notify (engine, ow->path, changes, NULL, FALSE, NULL, engine->user_data);
545ecd
     }
545ecd
 
545ecd
   guint num_establishing = dconf_engine_count_subscriptions (engine->establishing,
545ecd
                                                              ow->path);
545ecd
+  g_debug ("watch_established: \"%s\" (establishing: %d)", ow->path, num_establishing);
545ecd
   if (num_establishing > 0)
545ecd
     // Subscription(s): establishing -> active
545ecd
     dconf_engine_move_subscriptions (engine->establishing,
545ecd
@@ -948,6 +950,7 @@ dconf_engine_watch_fast (DConfEngine *engine,
545ecd
 {
545ecd
   guint num_establishing = dconf_engine_count_subscriptions (engine->establishing, path);
545ecd
   guint num_active = dconf_engine_count_subscriptions (engine->active, path);
545ecd
+  g_debug ("watch_fast: \"%s\" (establishing: %d, active: %d)", path, num_establishing, num_active);
545ecd
   if (num_active > 0)
545ecd
     // Subscription: inactive -> active
545ecd
     dconf_engine_inc_subscriptions (engine->active, path);
545ecd
@@ -1000,6 +1003,7 @@ dconf_engine_unwatch_fast (DConfEngine *engine,
545ecd
   guint num_active = dconf_engine_count_subscriptions (engine->active, path);
545ecd
   guint num_establishing = dconf_engine_count_subscriptions (engine->establishing, path);
545ecd
   gint i;
545ecd
+  g_debug ("unwatch_fast: \"%s\" (active: %d, establishing: %d)", path, num_active, num_establishing);
545ecd
 
545ecd
   // Client code cannot unsubscribe if it is not subscribed
545ecd
   g_assert (num_active > 0 || num_establishing > 0);
545ecd
@@ -1056,6 +1060,7 @@ dconf_engine_watch_sync (DConfEngine *engine,
545ecd
                          const gchar *path)
545ecd
 {
545ecd
   guint num_active = dconf_engine_inc_subscriptions (engine->active, path);
545ecd
+  g_debug ("watch_sync: \"%s\" (active: %d)", path, num_active - 1);
545ecd
   if (num_active == 1)
545ecd
     dconf_engine_handle_match_rule_sync (engine, "AddMatch", path);
545ecd
 }
545ecd
@@ -1065,6 +1070,7 @@ dconf_engine_unwatch_sync (DConfEngine *engine,
545ecd
                            const gchar *path)
545ecd
 {
545ecd
   guint num_active = dconf_engine_dec_subscriptions (engine->active, path);
545ecd
+  g_debug ("unwatch_sync: \"%s\" (active: %d)", path, num_active + 1);
545ecd
   if (num_active == 0)
545ecd
     dconf_engine_handle_match_rule_sync (engine, "RemoveMatch", path);
545ecd
 }
545ecd
@@ -1274,7 +1280,7 @@ dconf_engine_change_fast (DConfEngine     *engine,
545ecd
                           GError         **error)
545ecd
 {
545ecd
   GList *node;
545ecd
-
545ecd
+  g_debug ("change_fast");
545ecd
   if (dconf_changeset_is_empty (changeset))
545ecd
     return TRUE;
545ecd
 
545ecd
@@ -1341,6 +1347,7 @@ dconf_engine_change_sync (DConfEngine     *engine,
545ecd
                           GError         **error)
545ecd
 {
545ecd
   GVariant *reply;
545ecd
+  g_debug ("change_sync");
545ecd
 
545ecd
   if (dconf_changeset_is_empty (changeset))
545ecd
     {
545ecd
@@ -1519,6 +1526,7 @@ dconf_engine_has_outstanding (DConfEngine *engine)
545ecd
 void
545ecd
 dconf_engine_sync (DConfEngine *engine)
545ecd
 {
545ecd
+  g_debug ("sync");
545ecd
   dconf_engine_lock_queues (engine);
545ecd
   while (!g_queue_is_empty (&engine->in_flight))
545ecd
     g_cond_wait (&engine->queue_cond, &engine->queue_lock);
545ecd
diff --git a/gsettings/dconfsettingsbackend.c b/gsettings/dconfsettingsbackend.c
545ecd
index 752e013..6c8179b 100644
545ecd
--- a/gsettings/dconfsettingsbackend.c
545ecd
+++ b/gsettings/dconfsettingsbackend.c
545ecd
@@ -232,6 +232,7 @@ dconf_engine_change_notify (DConfEngine         *engine,
545ecd
 {
545ecd
   GWeakRef *weak_ref = user_data;
545ecd
   DConfSettingsBackend *dcsb;
545ecd
+  g_debug ("change_notify: %s", prefix);
545ecd
 
545ecd
   dcsb = g_weak_ref_get (weak_ref);
545ecd
 
545ecd
-- 
545ecd
2.20.1
545ecd