[gnome-builder/wip/gtk4-port] plugins/clang: add tracing to diagnostic provider
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/clang: add tracing to diagnostic provider
- Date: Tue, 26 Apr 2022 21:23:01 +0000 (UTC)
commit f2caa01646a910b7392f29020b8e351cafe11af8
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 26 14:15:50 2022 -0700
plugins/clang: add tracing to diagnostic provider
src/plugins/clang/ide-clang-diagnostic-provider.c | 33 ++++++++++++++++++-----
1 file changed, 26 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/clang/ide-clang-diagnostic-provider.c
b/src/plugins/clang/ide-clang-diagnostic-provider.c
index 48773c301..b7f6a2ed0 100644
--- a/src/plugins/clang/ide-clang-diagnostic-provider.c
+++ b/src/plugins/clang/ide-clang-diagnostic-provider.c
@@ -20,7 +20,10 @@
#define G_LOG_DOMAIN "ide-clang-diagnostic-provider"
+#include "config.h"
+
#include <glib/gi18n.h>
+
#include <libide-foundry.h>
#include "ide-clang-client.h"
@@ -31,8 +34,6 @@ struct _IdeClangDiagnosticProvider
IdeObject parent_instance;
};
-static void diagnostic_provider_iface_init (IdeDiagnosticProviderInterface *iface);
-
static void
ide_clang_diagnostic_provider_diagnose_cb (GObject *object,
GAsyncResult *result,
@@ -43,6 +44,8 @@ ide_clang_diagnostic_provider_diagnose_cb (GObject *object,
g_autoptr(IdeDiagnostics) diagnostics = NULL;
g_autoptr(GError) error = NULL;
+ IDE_ENTRY;
+
g_assert (IDE_IS_CLANG_CLIENT (client));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (IDE_IS_TASK (task));
@@ -53,6 +56,8 @@ ide_clang_diagnostic_provider_diagnose_cb (GObject *object,
ide_task_return_pointer (task,
IDE_OBJECT (g_steal_pointer (&diagnostics)),
ide_object_unref_and_destroy);
+
+ IDE_EXIT;
}
static void
@@ -68,6 +73,8 @@ diagnose_get_build_flags_cb (GObject *object,
IdeContext *context;
GFile *file;
+ IDE_ENTRY;
+
g_assert (IDE_IS_BUILD_SYSTEM (build_system));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (IDE_IS_TASK (task));
@@ -84,6 +91,8 @@ diagnose_get_build_flags_cb (GObject *object,
cancellable,
ide_clang_diagnostic_provider_diagnose_cb,
g_steal_pointer (&task));
+
+ IDE_EXIT;
}
static void
@@ -100,6 +109,8 @@ ide_clang_diagnostic_provider_diagnose_async (IdeDiagnosticProvider *provider,
IdeBuildSystem *build_system;
IdeContext *context;
+ IDE_ENTRY;
+
g_assert (IDE_IS_CLANG_DIAGNOSTIC_PROVIDER (self));
g_assert (IDE_IS_CLANG_DIAGNOSTIC_PROVIDER (self));
@@ -115,6 +126,8 @@ ide_clang_diagnostic_provider_diagnose_async (IdeDiagnosticProvider *provider,
cancellable,
diagnose_get_build_flags_cb,
g_steal_pointer (&task));
+
+ IDE_EXIT;
}
static IdeDiagnostics *
@@ -122,10 +135,16 @@ ide_clang_diagnostic_provider_diagnose_finish (IdeDiagnosticProvider *provider,
GAsyncResult *result,
GError **error)
{
+ IdeDiagnostics *ret;
+
+ IDE_ENTRY;
+
g_return_val_if_fail (IDE_IS_CLANG_DIAGNOSTIC_PROVIDER (provider), NULL);
g_return_val_if_fail (IDE_IS_TASK (result), NULL);
- return ide_task_propagate_pointer (IDE_TASK (result), error);
+ ret = ide_task_propagate_pointer (IDE_TASK (result), error);
+
+ IDE_RETURN (ret);
}
static void
@@ -136,10 +155,10 @@ diagnostic_provider_iface_init (IdeDiagnosticProviderInterface *iface)
}
G_DEFINE_FINAL_TYPE_WITH_CODE (IdeClangDiagnosticProvider,
- ide_clang_diagnostic_provider,
- IDE_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (IDE_TYPE_DIAGNOSTIC_PROVIDER,
- diagnostic_provider_iface_init))
+ ide_clang_diagnostic_provider,
+ IDE_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_DIAGNOSTIC_PROVIDER,
+ diagnostic_provider_iface_init))
static void
ide_clang_diagnostic_provider_class_init (IdeClangDiagnosticProviderClass *klass)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]