diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-02-12 09:56:10 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-02-12 09:58:52 +0100 |
commit | 6de85c0a68ac3a3bae21c780559de74e671419ae (patch) | |
tree | ce224d833f670cf4de497a1877359efd423a8a27 /gdk/gdkprofilerprivate.h | |
parent | c2dcd1bf941dfa4f4269239eff67207d978a7a76 (diff) | |
download | gtk+-6de85c0a68ac3a3bae21c780559de74e671419ae.tar.gz |
Add gdk_profiler_add_markf() to do printf formating
This allows us to avoid hand-rolling g_strdup_printf calls,
but also moves the printf into the called function where
it doesn't bloat the code of the calling function if the profiler
is not running.
Diffstat (limited to 'gdk/gdkprofilerprivate.h')
-rw-r--r-- | gdk/gdkprofilerprivate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdk/gdkprofilerprivate.h b/gdk/gdkprofilerprivate.h index 9696c7e2dc..99558e3adf 100644 --- a/gdk/gdkprofilerprivate.h +++ b/gdk/gdkprofilerprivate.h @@ -30,6 +30,11 @@ void gdk_profiler_add_mark (gint64 start, guint64 duration, const char *name, const char *message); +void gdk_profiler_add_markf (gint64 start, + guint64 duration, + const char *name, + const char *format, + ...) G_GNUC_PRINTF (4, 5); guint gdk_profiler_define_counter (const char *name, const char *description); void gdk_profiler_set_counter (guint id, |