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

FEX-Emu: Profile stats support #1577

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

Sonicadvance1
Copy link
Contributor

This implements support for FEX-Emu's profiling stats interface behind a command line option that isn't default enabled.

The purpose of these statistics in FEX-Emu is to expose statistics that are high frequency and can't easily be collected in other ways due to overhead. The reason why these are getting exposed in Mangohud versus another path is to have that information readily available while running a game. It's sometimes difficult to understand why a game has stuttered in FEX and being able to attribute the stutter to FEX-Emu overheads. This allows us to directly related these stats to frame time drops in the game.

The attached example is a good indicator for why a game is having low performance and how the stats look. We can see in the image that the game (Celeste) is only running at 55FPS, with a CPU core being pegged to 100% and then the FEX stats lets us know that 33.7 million soft float operations are happening, ~600k per frame.

The implementation is already in FEX-Emu upstream
(FEX-Emu/FEX#4291) and we aren't expecting the implementation to change heavily, potentially just adding additional sample events. We version these stats so that if they change in the future, that the interface doesn't get broken on one side versus the other.

Celeste5

This implements support for FEX-Emu's profiling stats interface behind a
command line option that isn't default enabled.

The purpose of these statistics in FEX-Emu is to expose statistics that
are high frequency and can't easily be collected in other ways due to
overhead. The reason why these are getting exposed in Mangohud versus
another path is to have that information readily available while running
a game. It's sometimes difficult to understand why a game has stuttered
in FEX and being able to attribute the stutter to FEX-Emu overheads.
This allows us to directly related these stats to frame time drops in
the game.

The attached example is a good indicator for why a game is having low
performance and how the stats look. We can see in the image that the
game (Celeste) is only running at 55FPS, with a CPU core being pegged to
100% and then the FEX stats lets us know that 33.7 million soft float
operations are happening, ~600k per frame.

The implementation is already in FEX-Emu upstream
(FEX-Emu/FEX#4291) and we aren't expecting the
implementation to change heavily, potentially just adding additional
sample events. We version these stats so that if they change in the
future, that the interface doesn't get broken on one side versus the
other.
@flightlessmango flightlessmango merged commit 591e025 into flightlessmango:master Feb 24, 2025
5 checks passed
@Sonicadvance1 Sonicadvance1 deleted the fex branch February 24, 2025 20:26
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