-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add documentation on how to use Tracy and Perfetto #11484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
44dee1c to
2b21a42
Compare
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
00cf4f1 to
74c46a5
Compare
|
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 :-) |
aa775c7 to
e5bd5a8
Compare
Ivorforce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good!
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
6bbb449 to
3b017d0
Compare
|
@Ivorforce @AThousandShips Thanks for the review! I think I've integrated all your feedback in my latest push :-) |
Ivorforce
left a comment
There was a problem hiding this 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 | |||
There was a problem hiding this comment.
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++.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the page title isn't from this PR (it's pre-existing), I don't think we need to resolve this here. The title can be addressed in another PR
| To learn more, see the | ||
| `Tracy manual <https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf>`_. | ||
|
|
||
| Perfetto for Android |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
AThousandShips
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
engine_details/development/debugging/profiling/sampling_profilers.rst
Outdated
Show resolved
Hide resolved
3b017d0 to
85dcccc
Compare
85dcccc to
5a3f3b8
Compare
5a3f3b8 to
ed378b8
Compare
|
When I previously used a Tracy integration, GDExtensions could not reload. (At least on Linux, I'm not sure about Windows). If this is still true, it may be worth mentioning. |
|
Did you use the Tracy Gdextension? |
|
|
Aha, that should explain it. |
|
Oh my bad, I misinterpreted your question. I actually had it compiled as a custom module, not as GDExtension. |
AdriaandeJongh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followed the guide but didn't get tracy to work unfortunately. As I am now stuck, and with little knowledge of what went wrong where, perhaps a bit of info on common mistakes or troubleshooting would be in order? It would help if I'd know what actually went wrong so I could make a more specific suggestion...
AdriaandeJongh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it to work! There was an important scons argument missing from this guide. Other than that I think the guide is pretty good! Thanks a lot @dsnopek!
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
engine_details/development/debugging/profiling/tracing_profilers.rst
Outdated
Show resolved
Hide resolved
Let's save this bit for a follow-up. I'd really like to get the simplest "getting started" steps merged in this PR, and then it can be built upon |
I tend to agree with this approach, but it’s very easy to add now, and without it, it will lead to issue reports. it makes the GDScript tracy implementation seem broken. |
ed378b8 to
1f1c0ee
Compare
AdriaandeJongh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aside from the missing mention of enable the checkboxes in the player settings to get correct line numbers in tracy, the guide is great!
| First, clone the latest version of the Tracy source code ("0.13.0" at the | ||
| time of writing) using Git: | ||
|
|
||
| .. code-block:: shell | ||
| git clone -b v0.13.0 --single-branch https://github.com/wolfpld/tracy.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracy has relatively frequent releases so this will get out of date quickly, and we don't want to have to update it regularly (which would add churn and also invalidate translations), so I'd suggest looking for an alternative that doesn't hardcode a version number.
You can use https://github.com/wolfpld/tracy/releases/latest to link to the latest tag, but that's not usable for the git clone command.
akien-mga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge so we can link to this in the beta 1 blog post.
|
Thanks! |

This takes the existing
using_cpp_profilers.rstand 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 :-)