Skip to content

Integrate the Tracy profiler#865

Draft
inequation wants to merge 2 commits intoopenmoh:mainfrom
inequation:tracy
Draft

Integrate the Tracy profiler#865
inequation wants to merge 2 commits intoopenmoh:mainfrom
inequation:tracy

Conversation

@inequation
Copy link
Copy Markdown
Contributor

This is now good enough to discuss how (and if) it should be merged, I think.

Tracy is a pretty great frame profiler: https://wolf.nereid.pl/projects/tracy-profiler/

Instructions for use:

I see two major points of contention:

  • whether using a git submodule for Tracy is appropriate, and
  • whether the approach I've taken - always include Tracy headers (they #define empty macros that boil all instrumentation away), regardless of whether TRACY_ENABLE is on/true or not, is the desired one.

There's also the question of whether sys_tracy.cpp lives in the right place of the source tree vs which target it's part of (tracy), missing documentation, code style etc.

I'm also considering upstreaming it into ioquake3, but that's a bunch of additional work.

- Build Tracy client as a shared library for multi-DLL support.
- Add profiling zones to major engine subsystems.
- Adjust frame markers for accurate frame time capture.
- Drain the backlog upon graceful exit.
@smallmodel
Copy link
Copy Markdown
Member

I think the maximum would be to just integrate it in the build in the least invasive way possible without touching any C/C++ source file (except for initializing or cleaning up).
OPM should not be hardly dependent on a specific profiler, anyone should be able to bring their own.

godotengine/godot#104851 Someone integrated Tracy to Godot Engine, but in a way that makes it soft-dependent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants