From f77983286115f580b85ac7c2c8fcdba0a0ffb693 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 21 Jan 2024 13:58:09 -0500 Subject: [PATCH] Tweak profiling strings Capitalize our mark names, and use GTK as category. The justification is: it looks better in sysprof. --- gdk/gdkdisplay.c | 9 +++------ gdk/gdkframeclock.c | 12 ++++++------ gdk/gdkframeclockidle.c | 2 +- gdk/gdkglcontext.c | 4 ++-- gdk/gdkprofiler.c | 13 +++++++------ gdk/gdksurface.c | 4 ++-- gdk/loaders/gdkjpeg.c | 2 +- gdk/loaders/gdkpng.c | 2 +- gdk/loaders/gdktiff.c | 2 +- gdk/wayland/gdkcairocontext-wayland.c | 4 ++-- gdk/wayland/gdkdisplay-wayland.c | 2 +- gdk/wayland/gdkpopup-wayland.c | 2 +- gdk/wayland/gdksurface-wayland.c | 2 +- gdk/wayland/gdktoplevel-wayland.c | 2 +- gsk/gl/gskglcommandqueue.c | 8 ++++---- gsk/gl/gskgldriver.c | 4 ++-- gsk/gl/gskglglyphlibrary.c | 2 +- gsk/gl/gskgliconlibrary.c | 2 +- gsk/gl/gskglrenderjob.c | 4 ++-- gtk/gtkapplication.c | 4 ++-- gtk/gtkbuilderparser.c | 2 +- gtk/gtkcssnode.c | 2 +- gtk/gtkcssprovider.c | 4 ++-- gtk/gtkemojichooser.c | 4 ++-- gtk/gtkicontheme.c | 4 ++-- gtk/gtkimcontextsimple.c | 2 +- gtk/gtkmain.c | 6 +++--- gtk/gtkwidget.c | 4 ++-- 28 files changed, 56 insertions(+), 58 deletions(-) diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 9f51bce222..c781c0a961 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -1363,7 +1363,7 @@ gdk_display_init_gl (GdkDisplay *self) return; } - gdk_profiler_end_mark (before2, "realize OpenGL context", NULL); + gdk_profiler_end_mark (before2, "Realize OpenGL context", NULL); /* Only assign after realize, so GdkGLContext::realize() can use * gdk_display_get_gl_context() == NULL to differentiate between @@ -1373,7 +1373,7 @@ gdk_display_init_gl (GdkDisplay *self) gdk_gl_backend_use (GDK_GL_CONTEXT_GET_CLASS (context)->backend_type); - gdk_profiler_end_mark (before, "initialize OpenGL", NULL); + gdk_profiler_end_mark (before, "Init OpenGL", NULL); } /** @@ -1768,7 +1768,6 @@ gdk_display_init_egl (GdkDisplay *self, { GdkDisplayPrivate *priv = gdk_display_get_instance_private (self); G_GNUC_UNUSED gint64 start_time = GDK_PROFILER_CURRENT_TIME; - G_GNUC_UNUSED gint64 start_time2; int major, minor; if (!gdk_gl_backend_can_be_used (GDK_GL_EGL, error)) @@ -1795,7 +1794,6 @@ gdk_display_init_egl (GdkDisplay *self, return FALSE; } - start_time2 = GDK_PROFILER_CURRENT_TIME; if (!eglInitialize (priv->egl_display, &major, &minor)) { priv->egl_display = NULL; @@ -1804,7 +1802,6 @@ gdk_display_init_egl (GdkDisplay *self, _("Could not initialize EGL display")); return FALSE; } - gdk_profiler_end_mark (start_time2, "eglInitialize", NULL); if (major < GDK_EGL_MIN_VERSION_MAJOR || (major == GDK_EGL_MIN_VERSION_MAJOR && minor < GDK_EGL_MIN_VERSION_MINOR)) @@ -1894,7 +1891,7 @@ gdk_display_init_egl (GdkDisplay *self, g_free (ext); } - gdk_profiler_end_mark (start_time, "init EGL", NULL); + gdk_profiler_end_mark (start_time, "Init EGL", NULL); return TRUE; } diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c index fce74228d8..c22c1a436d 100644 --- a/gdk/gdkframeclock.c +++ b/gdk/gdkframeclock.c @@ -79,7 +79,7 @@ static guint signals[LAST_SIGNAL]; static guint fps_counter; -#define FRAME_HISTORY_MAX_LENGTH 128 +#define FRAME_HISTORY_MAX_LENGTH 1000 struct _GdkFrameClockPrivate { @@ -687,7 +687,7 @@ _gdk_frame_clock_emit_update (GdkFrameClock *frame_clock) g_signal_emit (frame_clock, signals[UPDATE], 0); - gdk_profiler_end_mark (before, "frameclock update", NULL); + gdk_profiler_end_mark (before, "Frameclock update", NULL); } void @@ -699,7 +699,7 @@ _gdk_frame_clock_emit_layout (GdkFrameClock *frame_clock) g_signal_emit (frame_clock, signals[LAYOUT], 0); - gdk_profiler_end_mark (before, "frameclock layout", NULL); + gdk_profiler_end_mark (before, "Frameclock layout", NULL); } void @@ -711,7 +711,7 @@ _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock) g_signal_emit (frame_clock, signals[PAINT], 0); - gdk_profiler_end_mark (before, "frameclock paint", NULL); + gdk_profiler_end_mark (before, "Frameclock paint", NULL); } void @@ -811,12 +811,12 @@ _gdk_frame_clock_add_timings_to_profiler (GdkFrameClock *clock, { if (timings->drawn_time != 0) { - gdk_profiler_add_mark (1000 * timings->drawn_time, 0, "drawn window", NULL); + gdk_profiler_add_mark (1000 * timings->drawn_time, 0, "Drawn window", NULL); } if (timings->presentation_time != 0) { - gdk_profiler_add_mark (1000 * timings->presentation_time, 0, "presented window", NULL); + gdk_profiler_add_mark (1000 * timings->presentation_time, 0, "Presented window", NULL); } gdk_profiler_set_counter (fps_counter, gdk_frame_clock_get_fps (clock)); diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c index d988f0da22..d4cea1456e 100644 --- a/gdk/gdkframeclockidle.c +++ b/gdk/gdkframeclockidle.c @@ -694,7 +694,7 @@ gdk_frame_clock_paint_idle (void *data) if (!gdk_frame_clock_idle_is_frozen (clock_idle)) priv->sleep_serial = get_sleep_serial (); - gdk_profiler_end_mark (before, "frameclock cycle", NULL); + gdk_profiler_end_mark (before, "Frameclock cycle", NULL); return FALSE; } diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 28bdd2ebc9..4d1495f268 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -386,7 +386,7 @@ gdk_gl_context_create_egl_context (GdkGLContext *context, else if (epoxy_has_egl_extension (egl_display, "EGL_EXT_swap_buffers_with_damage")) priv->eglSwapBuffersWithDamage = (gpointer) epoxy_eglGetProcAddress ("eglSwapBuffersWithDamageEXT"); - gdk_profiler_end_mark (start_time, "realize GdkWaylandGLContext", NULL); + gdk_profiler_end_mark (start_time, "Create EGL context", NULL); return api; } @@ -669,7 +669,7 @@ gdk_gl_context_real_end_frame (GdkDrawContext *draw_context, egl_surface = gdk_surface_get_egl_surface (surface); - gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "EGL", "swap buffers"); + gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "EGL swap buffers", NULL); if (priv->eglSwapBuffersWithDamage) { diff --git a/gdk/gdkprofiler.c b/gdk/gdkprofiler.c index 9e456efeae..2a19d3b6ec 100644 --- a/gdk/gdkprofiler.c +++ b/gdk/gdkprofiler.c @@ -32,6 +32,7 @@ #include "version/gdkversionmacros.h" #include "gdkframeclockprivate.h" +#define CATEGORY "GTK" gboolean gdk_profiler_is_running (void) @@ -50,7 +51,7 @@ void const char *message) { #ifdef HAVE_SYSPROF - sysprof_collector_mark (begin_time, duration, "gtk", name, message); + sysprof_collector_mark (begin_time, duration, CATEGORY, name, message); #endif } @@ -60,7 +61,7 @@ void const char *message) { #ifdef HAVE_SYSPROF - sysprof_collector_mark (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, "gtk", name, message); + sysprof_collector_mark (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, CATEGORY, name, message); #endif } @@ -74,7 +75,7 @@ void #ifdef HAVE_SYSPROF va_list args; va_start (args, message_format); - sysprof_collector_mark_vprintf (begin_time, duration, "gtk", name, message_format, args); + sysprof_collector_mark_vprintf (begin_time, duration, CATEGORY, name, message_format, args); va_end (args); #endif /* HAVE_SYSPROF */ } @@ -88,7 +89,7 @@ void #ifdef HAVE_SYSPROF va_list args; va_start (args, message_format); - sysprof_collector_mark_vprintf (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, "gtk", name, message_format, args); + sysprof_collector_mark_vprintf (begin_time, GDK_PROFILER_CURRENT_TIME - begin_time, CATEGORY, name, message_format, args); va_end (args); #endif /* HAVE_SYSPROF */ } @@ -103,7 +104,7 @@ guint counter.id = sysprof_collector_request_counters (1); counter.type = SYSPROF_CAPTURE_COUNTER_DOUBLE; counter.value.vdbl = 0.0; - g_strlcpy (counter.category, "gtk", sizeof counter.category); + g_strlcpy (counter.category, CATEGORY, sizeof counter.category); g_strlcpy (counter.name, name, sizeof counter.name); g_strlcpy (counter.description, description, sizeof counter.name); @@ -125,7 +126,7 @@ guint counter.id = sysprof_collector_request_counters (1); counter.type = SYSPROF_CAPTURE_COUNTER_INT64; counter.value.v64 = 0; - g_strlcpy (counter.category, "gtk", sizeof counter.category); + g_strlcpy (counter.category, CATEGORY, sizeof counter.category); g_strlcpy (counter.name, name, sizeof counter.name); g_strlcpy (counter.description, description, sizeof counter.name); diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index d35516b4b4..6876f8967e 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2839,7 +2839,7 @@ add_event_mark (GdkEvent *event, class = g_type_class_ref (GDK_TYPE_EVENT_TYPE); value = g_enum_get_value (class, event_type); g_type_class_unref (class); - kind = value ? value->value_nick : "event"; + kind = value ? value->value_nick : "Event"; switch ((int) event_type) { @@ -2909,7 +2909,7 @@ add_event_mark (GdkEvent *event, break; } - gdk_profiler_add_mark (time, end_time - time, "event", message ? message : kind); + gdk_profiler_add_mark (time, end_time - time, "Event", message ? message : kind); g_free (message); #endif diff --git a/gdk/loaders/gdkjpeg.c b/gdk/loaders/gdkjpeg.c index 1ddb3e6dd5..2d32d0832a 100644 --- a/gdk/loaders/gdkjpeg.c +++ b/gdk/loaders/gdkjpeg.c @@ -237,7 +237,7 @@ gdk_load_jpeg (GBytes *input_bytes, g_bytes_unref (bytes); - gdk_profiler_end_mark (before, "jpeg load", NULL); + gdk_profiler_end_mark (before, "Load jpeg", NULL); return texture; } diff --git a/gdk/loaders/gdkpng.c b/gdk/loaders/gdkpng.c index c2de26fd32..8af404efc5 100644 --- a/gdk/loaders/gdkpng.c +++ b/gdk/loaders/gdkpng.c @@ -304,7 +304,7 @@ gdk_load_png (GBytes *bytes, { gint64 end = GDK_PROFILER_CURRENT_TIME; if (end - before > 500000) - gdk_profiler_add_mark (before, end - before, "png load", NULL); + gdk_profiler_add_mark (before, end - before, "Load png", NULL); } return texture; diff --git a/gdk/loaders/gdktiff.c b/gdk/loaders/gdktiff.c index 12c8958d1c..93f39a7830 100644 --- a/gdk/loaders/gdktiff.c +++ b/gdk/loaders/gdktiff.c @@ -504,7 +504,7 @@ gdk_load_tiff (GBytes *input_bytes, { gint64 end = GDK_PROFILER_CURRENT_TIME; if (end - before > 500000) - gdk_profiler_add_mark (before, end - before, "tiff load", NULL); + gdk_profiler_add_mark (before, end - before, "Load tiff", NULL); } return texture; diff --git a/gdk/wayland/gdkcairocontext-wayland.c b/gdk/wayland/gdkcairocontext-wayland.c index 92678bfaae..a078526544 100644 --- a/gdk/wayland/gdkcairocontext-wayland.c +++ b/gdk/wayland/gdkcairocontext-wayland.c @@ -186,7 +186,7 @@ gdk_wayland_cairo_context_end_frame (GdkDrawContext *draw_context, gdk_wayland_surface_attach_image (surface, self->paint_surface, painted); gdk_wayland_surface_request_frame (surface); - gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit"); + gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL); gdk_wayland_surface_commit (surface); gdk_wayland_surface_notify_committed (surface); @@ -206,7 +206,7 @@ gdk_wayland_cairo_context_empty_frame (GdkDrawContext *draw_context) gdk_wayland_surface_sync (surface); gdk_wayland_surface_request_frame (surface); - gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit"); + gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL); gdk_wayland_surface_commit (surface); gdk_wayland_surface_notify_committed (surface); } diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 229d1e27b3..d205ca5b10 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1253,7 +1253,7 @@ _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland) gdk_wayland_display_set_cursor_theme (GDK_DISPLAY (display_wayland), name, size); g_value_unset (&v); - gdk_profiler_end_mark (before, "wayland", "load cursor theme"); + gdk_profiler_end_mark (before, "Wayland cursor theme load", NULL); } diff --git a/gdk/wayland/gdkpopup-wayland.c b/gdk/wayland/gdkpopup-wayland.c index 9bd064b401..596ace7d6f 100644 --- a/gdk/wayland/gdkpopup-wayland.c +++ b/gdk/wayland/gdkpopup-wayland.c @@ -1012,7 +1012,7 @@ gdk_wayland_surface_create_xdg_popup (GdkWaylandPopup *wayland_popup, } } - gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit"); + gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL); wl_surface_commit (impl->display_server.wl_surface); if (GDK_IS_POPUP (surface)) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 1832a61d9e..e1a0e153b7 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -274,7 +274,7 @@ gdk_wayland_surface_frame_callback (GdkSurface *surface, GdkFrameClock *clock = gdk_surface_get_frame_clock (surface); GdkFrameTimings *timings; - gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "frame event"); + gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland frame event", NULL); GDK_DISPLAY_DEBUG (GDK_DISPLAY (display_wayland), EVENTS, "frame %p", surface); g_clear_pointer (&impl->frame_callback, wl_callback_destroy); diff --git a/gdk/wayland/gdktoplevel-wayland.c b/gdk/wayland/gdktoplevel-wayland.c index 5125a283a9..8d89ca121d 100644 --- a/gdk/wayland/gdktoplevel-wayland.c +++ b/gdk/wayland/gdktoplevel-wayland.c @@ -830,7 +830,7 @@ gdk_wayland_surface_create_xdg_toplevel (GdkWaylandToplevel *wayland_toplevel) maybe_set_gtk_surface_dbus_properties (wayland_toplevel); maybe_set_gtk_surface_modal (wayland_toplevel); - gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "wayland", "surface commit"); + gdk_profiler_add_mark (GDK_PROFILER_CURRENT_TIME, 0, "Wayland surface commit", NULL); wl_surface_commit (wayland_surface->display_server.wl_surface); } diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c index 1ebaef2108..66f82d9143 100644 --- a/gsk/gl/gskglcommandqueue.c +++ b/gsk/gl/gskglcommandqueue.c @@ -1608,8 +1608,8 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self, if (gdk_profiler_is_running ()) { - gdk_profiler_add_markf (start_time, GDK_PROFILER_CURRENT_TIME-start_time, - "Download Texture chunk", + gdk_profiler_end_markf (start_time, + "Download texture chunk", "Tile %dx%d Size %dx%d", x, y, width, height); start_time = GDK_PROFILER_CURRENT_TIME; } @@ -1654,8 +1654,8 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self, g_bytes_unref (bytes); if (gdk_profiler_is_running ()) - gdk_profiler_add_markf (start_time, GDK_PROFILER_CURRENT_TIME-start_time, - "Upload Texture chunk", + gdk_profiler_end_markf (start_time, + "Upload texture chunk", "Tile %dx%d Size %dx%d", x, y, width, height); } diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c index 496ddc8de1..c9d7e3fc1e 100644 --- a/gsk/gl/gskgldriver.c +++ b/gsk/gl/gskgldriver.c @@ -424,7 +424,7 @@ gsk_gl_driver_load_programs (GskGLDriver *self, failure: g_clear_object (&compiler); - gdk_profiler_end_mark (start_time, "load programs", NULL); + gdk_profiler_end_mark (start_time, "Load GL programs", NULL); return ret; } @@ -477,7 +477,7 @@ gsk_gl_driver_new (GskGLCommandQueue *command_queue, self->icons_library = gsk_gl_icon_library_new (self); self->shadows_library = gsk_gl_shadow_library_new (self); - gdk_profiler_end_mark (before, "create GskGLDriver", NULL); + gdk_profiler_end_mark (before, "Create GL driver", NULL); return g_steal_pointer (&self); } diff --git a/gsk/gl/gskglglyphlibrary.c b/gsk/gl/gskglglyphlibrary.c index c060f01dad..e1b3cedfe9 100644 --- a/gsk/gl/gskglglyphlibrary.c +++ b/gsk/gl/gskglglyphlibrary.c @@ -376,7 +376,7 @@ gsk_gl_glyph_library_upload_glyph (GskGLGlyphLibrary *self, { char message[64]; g_snprintf (message, sizeof message, "Size %dx%d", width, height); - gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload Glyph", message); + gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload glyph", message); } } diff --git a/gsk/gl/gskgliconlibrary.c b/gsk/gl/gskgliconlibrary.c index 8076cc3eff..118d40ec33 100644 --- a/gsk/gl/gskgliconlibrary.c +++ b/gsk/gl/gskgliconlibrary.c @@ -211,6 +211,6 @@ gsk_gl_icon_library_add (GskGLIconLibrary *self, { char message[64]; g_snprintf (message, sizeof message, "Size %dx%d", width, height); - gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload Icon", message); + gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Upload icon", message); } } diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index 31b22d947c..436b6466a4 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -4544,7 +4544,7 @@ gsk_gl_render_job_render (GskGLRenderJob *job, gsk_gl_render_job_visit_node (job, root); gdk_gl_context_pop_debug_group (job->command_queue->context); - gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Build GL command queue", ""); + gdk_profiler_end_mark (start_time, "Build GL command queue", ""); #if 0 /* At this point the atlases have uploaded content while we processed @@ -4562,7 +4562,7 @@ gsk_gl_render_job_render (GskGLRenderJob *job, gdk_gl_context_push_debug_group (job->command_queue->context, "Executing command queue"); gsk_gl_command_queue_execute (job->command_queue, surface_height, scale, job->region, job->default_framebuffer); gdk_gl_context_pop_debug_group (job->command_queue->context); - gdk_profiler_add_mark (start_time, GDK_PROFILER_CURRENT_TIME-start_time, "Execute GL command queue", ""); + gdk_profiler_end_mark (start_time, "Execute GL command queue", ""); } static int diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index f7a9125a0d..b080f43715 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -257,14 +257,14 @@ gtk_application_startup (GApplication *g_application) before2 = GDK_PROFILER_CURRENT_TIME; gtk_init (); - gdk_profiler_end_mark (before2, "gtk init", NULL); + gdk_profiler_end_mark (before2, "gtk_init", NULL); priv->impl = gtk_application_impl_new (application, gdk_display_get_default ()); gtk_application_impl_startup (priv->impl, priv->register_session); gtk_application_load_resources (application); - gdk_profiler_end_mark (before, "gtk application startup", NULL); + gdk_profiler_end_mark (before, "Application startup", NULL); } static void diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index 290e596b5e..fb093b7b48 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -2251,7 +2251,7 @@ _gtk_builder_parser_parse_buffer (GtkBuilder *builder, guint64 after = GDK_PROFILER_CURRENT_TIME; if (after - before > 500000) /* half a millisecond */ { - gdk_profiler_add_mark (before, after - before, "builder load", filename); + gdk_profiler_add_mark (before, after - before, "Builder load", filename); } } } diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c index 6ff8f1a26d..845b27bc9f 100644 --- a/gtk/gtkcssnode.c +++ b/gtk/gtkcssnode.c @@ -1363,7 +1363,7 @@ gtk_css_node_validate (GtkCssNode *cssnode) if (GDK_PROFILER_IS_RUNNING) { - gdk_profiler_end_mark (before, "css validation", ""); + gdk_profiler_end_mark (before, "Validate CSS", ""); gdk_profiler_set_int_counter (invalidated_nodes_counter, invalidated_nodes); gdk_profiler_set_int_counter (created_styles_counter, created_styles); invalidated_nodes = 0; diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 897fa337f4..29e88258a7 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1016,7 +1016,7 @@ gtk_css_provider_postprocess (GtkCssProvider *css_provider) } #endif - gdk_profiler_end_mark (before, "create selector tree", NULL); + gdk_profiler_end_mark (before, "Create CSS selector tree", NULL); } static void @@ -1081,7 +1081,7 @@ gtk_css_provider_load_internal (GtkCssProvider *self, if (GDK_PROFILER_IS_RUNNING) { char *uri = g_file_get_uri (file); - gdk_profiler_end_mark (before, "theme load", uri); + gdk_profiler_end_mark (before, "CSS theme load", uri); g_free (uri); } } diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c index d25c4f6c65..5d0b2ba97f 100644 --- a/gtk/gtkemojichooser.c +++ b/gtk/gtkemojichooser.c @@ -761,7 +761,7 @@ populate_emoji_chooser (gpointer data) now = g_get_monotonic_time (); if (now > start + 200) /* 2 ms */ { - gdk_profiler_add_mark (start * 1000, (now - start) * 1000, "emojichooser", "populate"); + gdk_profiler_add_mark (start * 1000, (now - start) * 1000, "Emojichooser populate", NULL); return G_SOURCE_CONTINUE; } } @@ -771,7 +771,7 @@ populate_emoji_chooser (gpointer data) chooser->box = NULL; chooser->populate_idle = 0; - gdk_profiler_end_mark (start, "emojichooser", "populate (finish)"); + gdk_profiler_end_mark (start, "Emojichooser populate (finish)", NULL); return G_SOURCE_REMOVE; } diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index d2ac05305e..3dde165f11 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -2069,7 +2069,7 @@ ensure_valid_themes (GtkIconTheme *self, load_themes (self); - gdk_profiler_end_mark (before, "icon theme load", self->current_theme); + gdk_profiler_end_mark (before, "Icon theme load", self->current_theme); if (was_valid) queue_theme_changed (self); @@ -3822,7 +3822,7 @@ icon_ensure_texture__locked (GtkIconPaintable *icon, /* Don't report quick (< 0.5 msec) parses */ if (end - before > 500000 || !in_thread) { - gdk_profiler_add_markf (before, (end - before), in_thread ? "icon load (thread)" : "icon load" , + gdk_profiler_add_markf (before, (end - before), in_thread ? "Icon load (thread)" : "Icon load" , "%s size %d@%d", icon->filename, icon->desired_size, icon->desired_scale); } } diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index d8ed8a3544..5e23bff4da 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -353,7 +353,7 @@ init_compose_table_thread_cb (GTask *task, g_task_return_boolean (task, TRUE); - gdk_profiler_end_mark (before, "im compose table load (thread)", NULL); + gdk_profiler_end_mark (before, "Compose table load (thread)", NULL); } static void diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index b2ab64c819..7641f9f815 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -549,7 +549,7 @@ do_post_parse_initialization (void) gsk_render_node_init_types (); _gtk_ensure_resources (); - gdk_profiler_end_mark (before, "basic initialization", NULL); + gdk_profiler_end_mark (before, "Basic initialization", NULL); gtk_initialized = TRUE; @@ -559,13 +559,13 @@ do_post_parse_initialization (void) #endif gtk_im_modules_init (); gtk_media_file_extension_init (); - gdk_profiler_end_mark (before, "init modules", NULL); + gdk_profiler_end_mark (before, "Init modules", NULL); before = GDK_PROFILER_CURRENT_TIME; display_manager = gdk_display_manager_get (); if (gdk_display_manager_get_default_display (display_manager) != NULL) default_display_notify_cb (display_manager); - gdk_profiler_end_mark (before, "create display", NULL); + gdk_profiler_end_mark (before, "Create display", NULL); g_signal_connect (display_manager, "notify::default-display", G_CALLBACK (default_display_notify_cb), diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 1f03d4a625..255c86d0cf 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -11956,7 +11956,7 @@ gtk_widget_render (GtkWidget *widget, if (GDK_PROFILER_IS_RUNNING) { before_render = GDK_PROFILER_CURRENT_TIME; - gdk_profiler_add_mark (before_snapshot, (before_render - before_snapshot), "widget snapshot", ""); + gdk_profiler_add_mark (before_snapshot, (before_render - before_snapshot), "Widget snapshot", ""); } if (root != NULL) @@ -11972,7 +11972,7 @@ gtk_widget_render (GtkWidget *widget, gsk_render_node_unref (root); - gdk_profiler_end_mark (before_render, "widget render", ""); + gdk_profiler_end_mark (before_render, "Widget render", ""); } }