summaryrefslogtreecommitdiffstats
path: root/src/shell-perf-log.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 15:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 15:07:22 +0000
commitf9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7 (patch)
treece9e8db2d4e8799780fa72ae8f1953039373e2ee /src/shell-perf-log.h
parentInitial commit. (diff)
downloadgnome-shell-f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7.tar.xz
gnome-shell-f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7.zip
Adding upstream version 3.38.6.upstream/3.38.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shell-perf-log.h')
-rw-r--r--src/shell-perf-log.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/shell-perf-log.h b/src/shell-perf-log.h
new file mode 100644
index 0000000..45d07a5
--- /dev/null
+++ b/src/shell-perf-log.h
@@ -0,0 +1,75 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#ifndef __SHELL_PERF_LOG_H__
+#define __SHELL_PERF_LOG_H__
+
+#include <glib-object.h>
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+#define SHELL_TYPE_PERF_LOG (shell_perf_log_get_type ())
+G_DECLARE_FINAL_TYPE (ShellPerfLog, shell_perf_log, SHELL, PERF_LOG, GObject)
+
+ShellPerfLog *shell_perf_log_get_default (void);
+
+void shell_perf_log_set_enabled (ShellPerfLog *perf_log,
+ gboolean enabled);
+
+void shell_perf_log_define_event (ShellPerfLog *perf_log,
+ const char *name,
+ const char *description,
+ const char *signature);
+void shell_perf_log_event (ShellPerfLog *perf_log,
+ const char *name);
+void shell_perf_log_event_i (ShellPerfLog *perf_log,
+ const char *name,
+ gint32 arg);
+void shell_perf_log_event_x (ShellPerfLog *perf_log,
+ const char *name,
+ gint64 arg);
+void shell_perf_log_event_s (ShellPerfLog *perf_log,
+ const char *name,
+ const char *arg);
+
+void shell_perf_log_define_statistic (ShellPerfLog *perf_log,
+ const char *name,
+ const char *description,
+ const char *signature);
+
+void shell_perf_log_update_statistic_i (ShellPerfLog *perf_log,
+ const char *name,
+ int value);
+void shell_perf_log_update_statistic_x (ShellPerfLog *perf_log,
+ const char *name,
+ gint64 value);
+
+typedef void (*ShellPerfStatisticsCallback) (ShellPerfLog *perf_log,
+ gpointer data);
+
+void shell_perf_log_add_statistics_callback (ShellPerfLog *perf_log,
+ ShellPerfStatisticsCallback callback,
+ gpointer user_data,
+ GDestroyNotify notify);
+
+void shell_perf_log_collect_statistics (ShellPerfLog *perf_log);
+
+typedef void (*ShellPerfReplayFunction) (gint64 time,
+ const char *name,
+ const char *signature,
+ GValue *arg,
+ gpointer user_data);
+
+void shell_perf_log_replay (ShellPerfLog *perf_log,
+ ShellPerfReplayFunction replay_function,
+ gpointer user_data);
+
+gboolean shell_perf_log_dump_events (ShellPerfLog *perf_log,
+ GOutputStream *out,
+ GError **error);
+gboolean shell_perf_log_dump_log (ShellPerfLog *perf_log,
+ GOutputStream *out,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __SHELL_PERF_LOG_H__ */