From ef446de92d3680dd13a66caf9c3afac8a4752ac7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 6 May 2019 13:30:20 -0700 Subject: [PATCH] Add docs Document the various ways to start profiling. --- docs/reference/gtk/running.sgml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/reference/gtk/running.sgml b/docs/reference/gtk/running.sgml index ae17857ce5..044ab55356 100644 --- a/docs/reference/gtk/running.sgml +++ b/docs/reference/gtk/running.sgml @@ -574,6 +574,32 @@ nevertheless. + + Profiling + + + GTK supports profiling with sysprof. It exports timing information + about frameclock phases and various characteristics of GskRenders + in a format that can be displayed by sysprof or GNOME Builder. + + + A simple way to capture data is to set the GTK_TRACE + environment variable. When it is set, GTK will write profiling + data to a file called + gtk.PID.syscap. + + + When launching the application from sysprof, it will set the + SYSPROF_TRACE_FD environment variable to point + GTK at a file descriptor to write profiling data to. + + + When GtkApplication registers with D-Bus, it exports the + org.gnome.Sysprof2.Profiler interface + that lets sysprof request profiling data at runtime. + + +