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

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