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

Improve stack frames for profilers #10976

Merged
merged 3 commits into from Jun 12, 2023

Conversation

TellowKrinkle
Copy link
Contributor

Some sampling profilers rely on the frame pointer to recover stack frames for samples.

Don't add -fomit-frame-pointer on RelWithDebInfo builds

I also added stack frames to the vertex loader functions, but if that ends up affecting performance, I can remove that, since it's really only useful for profilers without a JIT function declaration API.

@shuffle2
Copy link
Contributor

Yes it would definitely be good to check perf impact of that jit modification

@dvessel
Copy link
Contributor

dvessel commented Oct 21, 2022

Not sure what aspect needs to be stressed to test it but the performance is pretty much the same.

F-Zero: Sand Ocean intro

❯ gfx-render-time \
  --dolphin /Applications/Dolphin/master\ 5.0-17627-9222956-9222956.app -r 3 \
  --dtm F-Zero\ Sand\ Ocean\ Intro.dtm \
  --config=Graphics.Settings.InternalResolution=1
1/3 metal.........................8.401ms
Run completed. Sampled 11436 frames.
2/3 metal..........................8.388ms
Run completed. Sampled 11436 frames.
3/3 metal.........................8.381ms
Run completed. Sampled 11436 frames.
11436 frames 8.401ms metal pass 1
11436 frames 8.388ms metal pass 2
11436 frames 8.381ms metal pass 3
34308 frames 8.390ms complete

❯ gfx-render-time \
  --dolphin /Applications/Dolphin/StackFrames\ 5.0-17630-0903f3c-9222956.app -r 3 \
  --dtm F-Zero\ Sand\ Ocean\ Intro.dtm \
  --config=Graphics.Settings.InternalResolution=1
1/3 metal.........................8.387ms
Run completed. Sampled 11436 frames.
2/3 metal..........................8.381ms
Run completed. Sampled 11436 frames.
3/3 metal.........................8.382ms
Run completed. Sampled 11436 frames.
11436 frames 8.387ms metal pass 1
11436 frames 8.381ms metal pass 2
11436 frames 8.382ms metal pass 3
34308 frames 8.383ms complete

Super Mario Galaxy: hub area

❯ gfx-render-time \
  --dolphin /Applications/Dolphin/master\ 5.0-17627-9222956-9222956.app -r 3 \
  --dtm smg.dtm \
  --config=Graphics.Settings.InternalResolution=1
1/3 metal...............9.637ms
Run completed. Sampled 5654 frames.
2/3 metal
Warning! Early termination! Sampled 0 frames.
3/3 metal...............9.335ms
Run completed. Sampled 5654 frames.
 5654 frames 9.637ms metal pass 1
 5654 frames 9.335ms metal pass 3
11308 frames 9.486ms complete

❯ gfx-render-time \
  --dolphin /Applications/Dolphin/StackFrames\ 5.0-17630-0903f3c-9222956.app -r 3 \
  --dtm smg.dtm \
  --config=Graphics.Settings.InternalResolution=1
1/3 metal..............9.266ms
Run completed. Sampled 5654 frames.
2/3 metal
Warning! Early termination! Sampled 0 frames.
3/3 metal...............9.349ms
Run completed. Sampled 5654 frames.
 5654 frames 9.266ms metal pass 1
 5654 frames 9.349ms metal pass 3
11308 frames 9.308ms complete

Second run causes an error since wii games do not like being killed of so quickly. Something to fix in the script.

@shuffle2
Copy link
Contributor

I'm not sure which game/recording would make a good test, but at least there was a sanity check - thanks! So seems fine.

@OatmealDome OatmealDome merged commit 1a0a1e8 into dolphin-emu:master Jun 12, 2023
@TellowKrinkle TellowKrinkle deleted the StackFrames branch June 12, 2023 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants