[gtk/tracing] Add docs



commit da77616796bbee7a35e0fd76d08b9b21db26690d
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 6 13:30:20 2019 -0700

    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..0642d7819c 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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]