Skip to content
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

Add superluminal, Tracy and Optick profilers integration as Gems #834

Open
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

guillaume-haerinck
Copy link

@guillaume-haerinck guillaume-haerinck commented Feb 23, 2025

What does this PR do?

Users have now the choice to use :

  • imgui built-in profiler
  • PIX profiler
  • Superluminal
  • Tracy
  • Optick (only work when triggered from the engine, triggering a capture from the third party client freezes never moves past the first frame, even through the two processes can communicate)

Note : Pix integration would need to be made cleaner, as is does not rely on the AZ::Debug::Profiler (and said interface needs improvements to support GPU events)
Note : The profile API is lacking and will need improvements to supports these profilers to their full potential

Superluminal

change

Tracy

image

Optick

optick

How was this PR tested?

On windows custom build on development branch

Signed-off-by: guillaume-haerinck <[email protected]>

bool ProfilerSystemComponent::IsActive() const
{
return false;
Copy link
Author

Choose a reason for hiding this comment

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

While superluminal API does not provide anything to trigger a record from the editor, we don't want to leave this unimplemeted either as we can only have one active profiler at a time (with the exception of Pix that is doing its hook directly in profiler.h)

@guillaume-haerinck guillaume-haerinck self-assigned this Feb 23, 2025
@guillaume-haerinck guillaume-haerinck requested review from nick-l-o3de and a team and removed request for a team February 23, 2025 13:02
Signed-off-by: guillaume-haerinck <[email protected]>
@guillaume-haerinck guillaume-haerinck changed the title Add superluminal profiler integration as a Gem Add superluminal and Tracy profilers integration as Gems Feb 24, 2025
{
void CpuProfiler::Init()
{
AZ::Interface<AZ::Debug::Profiler>::Register(this);
Copy link
Author

Choose a reason for hiding this comment

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

Given that only one profiler can be active at a time, I might want to assert there, but ideally I should use a mechanism to say that when this gem is enabled none of the other profiling gem can be enabled, I don't know if we have something like that

Copy link
Contributor

Choose a reason for hiding this comment

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

There is, kinda-of. There is a field in gems.json called provided_unique_service that you can set to any string, and the scripts to enable gems should check against this. We did this for PhysX4 vs PhysX5

https://github.com/o3de/o3de/blob/f29613a5c80d8dbc53016bdaaf3849cd6d77f60f/Gems/PhysX/Core/PhysX4/gem.json#L26

https://github.com/o3de/o3de/blob/f29613a5c80d8dbc53016bdaaf3849cd6d77f60f/Gems/PhysX/Core/PhysX5/gem.json#L26

@spham-amzn
Copy link
Contributor

Looks like tabbing vs spaces issues going on

@byrcolin byrcolin added the sig/core Categorizes an issue or PR as relevant to SIG Core label Feb 25, 2025
@guillaume-haerinck guillaume-haerinck changed the title Add superluminal and Tracy profilers integration as Gems Add superluminal, Tracy and Optick profilers integration as Gems Feb 28, 2025
@guillaume-haerinck
Copy link
Author

Looks like tabbing vs spaces issues going on

Ran the clang-format on all of these files :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/core Categorizes an issue or PR as relevant to SIG Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants