Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.