diff --git a/doc/sphinx/toc/libweston/log.rst b/doc/sphinx/toc/libweston/log.rst index 34e925431..63bf1c644 100644 --- a/doc/sphinx/toc/libweston/log.rst +++ b/doc/sphinx/toc/libweston/log.rst @@ -178,6 +178,13 @@ The following illustrates how to use it: ./weston-debug timeline > log.json ./wesgr -i log.json -o log.svg +Weston has experimental support for `Perfetto `_ for +performance profiling. It can be enabled by using `-Dperfetto=true` during +the meson invocation to configure the build. + +If Perfetto support is built in, timeline points are added to Perfetto tracks +when Perfetto is running, even when the 'timeline' scope is not enabled. + Inserting timeline points ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -186,6 +193,13 @@ take the :type:`weston_compositor` instance, followed by the name of the timeline point. What follows next is a variable number of arguments, which **must** end with the macro :c:macro:`TLP_END`. +Adding Perfetto trace points +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In addition to timeline points, Perfetto can also display timing information +for individual functions. The easiest way to add profiling data for a function +is to insert the :c:macro:`WESTON_TRACE_FUNC` at the top of the function. + Debug protocol API ------------------