Skip to content

Tracy Profiler Integration #33

Open
@Daandelange

Description

@Daandelange

Opening a new issue for the Tracy integration, continuing the off-topic discussion from #22 .

So the idea is to integrate Tracy to facilitate debugging, with a focus on :

  • Data flow and order-of execution (plotting values, monitor execution times, mutex locks, etc,) frame by frame.
  • Memory usage (allocations, memory map, garbage collector, etc.)
  • GPU profiling on Linux + Windows.

Here's a screenshot from the 0.7.2 manual showing platform-specific features :
image


  • 0. Define where and how how to integrate it.
    I think it's important to keep Tracy as an optional build config : not everybody will need it, and as is seems to need recent system software to be able to inspect. What about a 3rd build option : Debug, DebugTracy, Release ?
    Later on, (special) release builds could also include it with a menu option to enable it, allowing remote debugging.

  • 1. Integrate the Tracy client into Mosaic/ofxVP. Easy : add submodule, include 1 file and set compile flag to enable.
    I have tested this with the Mosaic-Engine-Tester on a local branch. There seem to be some compile flags to set for better results (name stripping...). Also, they recommend not to run a client with a "debug config" regarding the associated compilation optimization flags.
    This makes Tracy send real-time Mosaic debug info over a network socket. (local by default)

  • 2. Compile the Tracy Profiler which allows to view & inspect the data.
    This seems as the easiest way to get started, there are more possibilities such as recording data for non-real-time debugging, and on-demand remote debugging.
    To build, you need to have a recent C++17 compiler. OSX 10.12.6 seems not possible. Maybe 10.13 with a more recent toolchain. I tried on a relatively old Linux Mint 16, with GCC 6.1, which should support C++17 but not with the needed extra features that Tracy uses. (Didn't try available workarounds yet.) So it looks like the Profiler needs a recent OS to be plug-and-play, compared to general OF/Mosaic capable setups.

  • 3. Fine-tune Tracy to our specific needs. Playing around with it will tell us. Probably some macros to add to get the best results, plus the optional-recommended macros to implement.

  • 4. Document usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions