Skip to content

Conversation

@dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Nov 21, 2025

This takes the existing using_cpp_profilers.rst and moves it to be about "Sampling profilers" (sampling_profilers.rst), so that a new page can be added about "Tracing profilers" (like Perfetto and Tracy!) and makes the old URL into an index that explains the difference and links to both pages.

This is marked as DRAFT for the moment, because it only covers Perfetto - I actually haven't had a chance try Tracy yet :-)

@dsnopek dsnopek requested a review from Ivorforce November 21, 2025 16:47
@dsnopek dsnopek added enhancement area:engine details Issues and PRs related to the Engine Details section of the documentation labels Nov 21, 2025
@dsnopek dsnopek marked this pull request as draft November 21, 2025 16:47
@dsnopek dsnopek force-pushed the tracing-profiler branch 3 times, most recently from 00cf4f1 to 74c46a5 Compare November 21, 2025 21:28
@dsnopek dsnopek changed the title [DRAFT] Add documentation on how to use Tracy and Perfetto Add documentation on how to use Tracy and Perfetto Nov 21, 2025
@dsnopek dsnopek marked this pull request as ready for review November 21, 2025 21:28
@dsnopek
Copy link
Contributor Author

dsnopek commented Nov 21, 2025

I've filled in the docs for Tracy now too, so taking this out of draft!

Given that I've only just tried Tracy for the first time, I'm very curious to hear if I'm using it correctly or not :-)

@dsnopek dsnopek force-pushed the tracing-profiler branch 2 times, most recently from aa775c7 to e5bd5a8 Compare November 21, 2025 22:40
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good!

@dsnopek dsnopek force-pushed the tracing-profiler branch 2 times, most recently from 6bbb449 to 3b017d0 Compare November 24, 2025 21:51
@dsnopek
Copy link
Contributor Author

dsnopek commented Nov 24, 2025

@Ivorforce @AThousandShips Thanks for the review! I think I've integrated all your feedback in my latest push :-)

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@@ -1,3 +1,3 @@
.. _doc_using_cpp_profilers:

Using C++ profilers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should C++ be dropped from the page title and page path since both sampling and tracing profilers can be used for more than C++ applications and the Godot codebase contains other languages besides C++.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the "C++" is in there to distinguish it from Godot's profiler?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the section is explicit enough that we could drop C++. For example, in the same section we have a using sanitizers page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sanitizers is a little different, though: there isn't a "Godot sanitizer" and "C++ sanitizers", whereas we do have a "Godot profiler" and "C++ profilers"

However, if we do rename it, I assume we'd want to keep the path the same so we don't have to deal with redirects?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, if we do rename it, I assume we'd want to keep the path the same so we don't have to deal with redirects?

yeah, keep things simpler.

To learn more, see the
`Tracy manual <https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf>`_.

Perfetto for Android
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth including that it supports Win/Mac/Linux as well.

Copy link
Contributor Author

@dsnopek dsnopek Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the way Godot has integrated it (at least so far) really supports Windows and Mac. It's setup to use the "system" backend, which requires connecting with Perfetto's system daemon which I think is only Linux and Android. If we added support for the "in process" backend we could add docs for how to use that later? The steps for using it would be somewhat different

This will create a ``perfetto`` directory - you can place this anywhere.

Next, build the Android debug or release templates for your architecture using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are debug symbols not required for Perfetto?

Copy link
Contributor Author

@dsnopek dsnopek Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! Debug symbols are not required for Perfetto, or Tracy either, if you just use its tracing stuff and not its sampling features

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

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

Labels

area:engine details Issues and PRs related to the Engine Details section of the documentation enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants