Better integration of perfetto performance tracing into virglrenderer
Currently, integrating the perfetto tracing framework is a compile time decision, and the tracing calls are always executed. The following issues need to be resolved:
- Using vperfetto_min as interface as it is done now is not very convenient for inclusion in ChromeOS.
- Even when tracing is not enabled, the tracing functions are always called.
- Since the aim is to do host/guest tracing, perfetto must be integrated with Mesa as well.
The approach suggested by perfetto-upstream is to embed the files perfetto.cc/hh
into the target software an use the functions and classes provided there. However, both, virglrenderer and Mesa require the implementation of a C
wrapper to make the interface in perfetto.hh usable.
Possible approaches to implement this are
- Embed the perfetto files as suggested by upstream and develop the C interface in virglrenderer and Mesa independently. If code can be shared a common library could later be extracted to crate a common library.
- Create the wrapper library as an external tool (similar to vperfetto_min or percetto, and Mesa and virglrenderer to this library on systems that make it easy to install additional libraries, or pull the dependencies in as meson wraps.
Edited by Gert Wollny