This is a continuation of Jonas Ådahl's Sysprof capturing work on Cogl that happened during the Performance Hackfest 2018. It allows capturing data about frame times and saving it into a syscap file, that is parsed by Sysprof to give a nice visualization of frame times.
Here's a screenshot of what to expect from this work:
The call stack is empty due to no proper Sysprof integration yet - nothing from it is being recorded beyong the frame times, which is what can be seen in the picture.
In order to correctly identify performance bottlenecks in the rendering routines, it is fundamental to have precise and reliable data. Without it, it's much harder to understand what's happening and make correct decisions - essentially, educated guess at most.
With Sysprof integration showing both frame times and CPU consumption, it will be possible to address this issue.
A new D-Bus interface is introduced. It is the first, embryonic tentative of what will be a generic Sysprof D-Bus interface that will be implemented by applications that integrate with instruments.
For testing purposes, a new tool was added:
mutter-profiler. It's usage is trivial:
$ mutter-profiler SECONDS
SECONDS is the number of seconds to profile. That captures frame information in a
cogl-trace-sp-capture.syscap file located in the home directory.
Validate the proposed
- Check if the pipe-based code actually works (requires Sysprof, or similar tool, to run)
- Adapt code style if necessary
- Work on Sysprof side