diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-05-06 13:30:20 -0700 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-07 09:37:59 -0700 |
commit | ef446de92d3680dd13a66caf9c3afac8a4752ac7 (patch) | |
tree | 3ad12348ae28d2c5097d17ff8976c8c7667e8dea | |
parent | 18127be3bd3a1bc003775d5dda14b8cb658fbf32 (diff) | |
download | gtk+-ef446de92d3680dd13a66caf9c3afac8a4752ac7.tar.gz |
Add docs
Document the various ways to start profiling.
-rw-r--r-- | docs/reference/gtk/running.sgml | 26 |
1 files changed, 26 insertions, 0 deletions
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. </refsect2> +<refsect2 id="profiling"> + <title>Profiling</title> + + <para> + 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. + </para> + <para> + A simple way to capture data is to set the <envar>GTK_TRACE</envar> + environment variable. When it is set, GTK will write profiling + data to a file called + <filename>gtk.<replaceable>PID</replaceable>.syscap</filename>. + </para> + <para> + When launching the application from sysprof, it will set the + <envar>SYSPROF_TRACE_FD</envar> environment variable to point + GTK at a file descriptor to write profiling data to. + </para> + <para> + When GtkApplication registers with D-Bus, it exports the + <literal>org.gnome.Sysprof2.Profiler</literal> interface + that lets sysprof request profiling data at runtime. + </para> +</refsect2> + </refsect1> </refentry> |