monado/doc/tracing-tracy.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.3 KiB
Markdown
Raw Normal View History

2022-11-22 12:42:23 +00:00
# Tracing with Tracy {#tracing-tracy}
<!--
2021-05-14 20:26:06 +00:00
Copyright 2022-2023, Collabora, Ltd. and the Monado contributors
2022-11-22 12:42:23 +00:00
SPDX-License-Identifier: BSL-1.0
-->
## Requirements
One of the tracing backends Monado has is [Tracy][]. Note, that the backend is
fully integrated so you only need to make sure that the correct CMake flags are
set, `XRT_HAVE_TRACY` and `XRT_FEATURE_TRACING`. Building the [Tracy][] profiler
is also required, but the order doesn't matter.
* Get the [Tracy][] profiler.
* **Linux**: build it, needs `glfw3`, `freetype2` & `capstone` dev packages.
* **Windows**: download release binaries from page, or build it.
* Build Monado with `XRT_FEATURE_TRACING` & `XRT_HAVE_TRACY` being `ON`.
## Running
Start the [Tracy][] profiler, either try to connect directly to the host you
want to run Monado on, or wait for it to show up in the first initial UI. Then
2021-05-14 20:26:06 +00:00
run Monado like you normally would, for example as follows.
2022-11-22 12:42:23 +00:00
```bash
monado-serivce
```
## Notes
Unlike @ref tracing-perfetto Tracy supports Windows, it also supports live
2021-05-14 20:26:06 +00:00
viewing of the data stream. But Tracy can only trace one application at a time,
whereas Perfetto can do multiple processes at the same time and whole system
tracing, giving a higher level overview of the whole system.
2022-11-22 12:42:23 +00:00
[Tracy]: https://github.com/wolfpld/tracy