smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Tracy GPU profiling

Open cmeissl opened this issue 2 years ago • 2 comments

PR for showcasing tracy gpu profiling

TODO

  • [ ] make the whole thing optional (maybe abstract gpu profiling and only depend on tracy in anvil?)
  • [X] ~~wait for release of profiling (https://github.com/aclysma/profiling/pull/56)~~ profiling 1.0.11 has been released which includes tracy-client 1.16.2
  • [ ] cpu and gpu timing seems to be off (see https://github.com/wolfpld/tracy/issues/17). maybe calibration can help here a bit?

Example: image

cmeissl avatar Sep 17 '23 10:09 cmeissl

Codecov Report

Patch coverage has no change and project coverage change: -0.02% :warning:

Comparison is base (d8600f2) 22.88% compared to head (9bf018c) 22.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1134      +/-   ##
==========================================
- Coverage   22.88%   22.87%   -0.02%     
==========================================
  Files         143      143              
  Lines       23050    23051       +1     
==========================================
- Hits         5275     5272       -3     
- Misses      17775    17779       +4     
Flag Coverage Δ
wlcs-buffer 20.00% <0.00%> (-0.01%) :arrow_down:
wlcs-core 19.65% <0.00%> (-0.01%) :arrow_down:
wlcs-output 8.10% <0.00%> (-0.01%) :arrow_down:
wlcs-pointer-input 21.59% <0.00%> (-0.08%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
build.rs 79.76% <0.00%> (-0.97%) :arrow_down:

... and 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 17 '23 10:09 codecov-commenter

maybe abstract gpu profiling and only depend on tracy in anvil?

Are there any other profilers one might use with similar GPU profiling instrumentation? If so, a trait abstracting them makes sense. If not, just having an optional tracy dependency might make sense.

Would it be reasonable to have a trait method of Renderer that calls profiler.scope? (And could also be implemented by a Vulkan renderer, when that exists.) I guess handling span_location! and also being agnostic to different profilers is awkward here.

ids1024 avatar Oct 30 '23 21:10 ids1024