[gnome-builder] ctags: add tracing macros



commit dde9653e3a377c1a7df4acb2f9455b5cab6e5778
Author: Christian Hergert <christian hergert me>
Date:   Thu Feb 18 13:58:08 2016 -0800

    ctags: add tracing macros

 plugins/ctags/ide-ctags-builder.c |    8 ++++++--
 plugins/ctags/ide-ctags-service.c |   12 +++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/plugins/ctags/ide-ctags-builder.c b/plugins/ctags/ide-ctags-builder.c
index 4d706bf..dd999e6 100644
--- a/plugins/ctags/ide-ctags-builder.c
+++ b/plugins/ctags/ide-ctags-builder.c
@@ -142,6 +142,8 @@ ide_ctags_builder_build_worker (GTask        *task,
   GError *error = NULL;
   IdeVcs *vcs;
 
+  IDE_ENTRY;
+
   g_assert (G_IS_TASK (task));
   g_assert (IDE_IS_CTAGS_BUILDER (self));
   g_assert (task_data == NULL);
@@ -176,7 +178,7 @@ ide_ctags_builder_build_worker (GTask        *task,
                                G_IO_ERROR,
                                G_IO_ERROR_INVALID_FILENAME,
                                "ctags can only operate on local files.");
-      return;
+      IDE_EXIT;
     }
 
   /* create the directory if necessary */
@@ -226,7 +228,7 @@ ide_ctags_builder_build_worker (GTask        *task,
   if (process == NULL)
     {
       g_task_return_error (task, error);
-      return;
+      IDE_EXIT;
     }
 
   g_task_set_task_data (task, g_file_new_for_path (tags_file), g_object_unref);
@@ -235,6 +237,8 @@ ide_ctags_builder_build_worker (GTask        *task,
                            cancellable,
                            ide_ctags_builder_process_wait_cb,
                            g_object_ref (task));
+
+  IDE_EXIT;
 }
 
 void
diff --git a/plugins/ctags/ide-ctags-service.c b/plugins/ctags/ide-ctags-service.c
index 5d4598e..7a97a1d 100644
--- a/plugins/ctags/ide-ctags-service.c
+++ b/plugins/ctags/ide-ctags-service.c
@@ -419,6 +419,8 @@ restart_miner (gpointer data)
   IdeCtagsService *self = data;
   IdeContext *context;
 
+  IDE_ENTRY;
+
   g_assert (IDE_IS_CTAGS_SERVICE (self));
 
   self->build_tags_timeout = 0;
@@ -439,8 +441,8 @@ restart_miner (gpointer data)
           vcs = ide_context_get_vcs (context);
           workdir = ide_vcs_get_working_directory (vcs);
           ide_tags_builder_build_async (IDE_TAGS_BUILDER (build_system), workdir, TRUE, NULL,
-                                        build_system_tags_cb, g_object_ref (self));;
-          goto finish;
+                                        build_system_tags_cb, g_object_ref (self));
+          IDE_GOTO (finish);
         }
     }
 
@@ -448,7 +450,7 @@ restart_miner (gpointer data)
 
 finish:
 
-  return G_SOURCE_REMOVE;
+  IDE_RETURN (G_SOURCE_REMOVE);
 }
 
 static void
@@ -456,12 +458,16 @@ ide_ctags_service_buffer_saved (IdeCtagsService  *self,
                                 IdeBuffer        *buffer,
                                 IdeBufferManager *buffer_manager)
 {
+  IDE_ENTRY;
+
   g_assert (IDE_IS_CTAGS_SERVICE (self));
   g_assert (IDE_IS_BUFFER (buffer));
   g_assert (IDE_IS_BUFFER_MANAGER (buffer_manager));
 
   if (self->build_tags_timeout == 0)
     self->build_tags_timeout = g_timeout_add_seconds (5, restart_miner, self);
+
+  IDE_EXIT;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]