needle-tools / selective-profiling

Selectively deep profile single methods while your game is running in Unity's Profiler 🔬
135 stars 11 forks source link

Deep Profiling: remove captured patches when not used by any selected method #5

Open marwie opened 3 years ago

marwie commented 3 years ago

Currently when deep profiling the callstack is captured and enabled/disabled depending on any calling method being active

Example: If we patch two different Update methods and one of them has a very large tree, then we remove the one with the large tree the nested calls (found via deep profiling) will still be enabled when we enable the method that does not really have those calls.

https://user-images.githubusercontent.com/5083203/111627999-00305380-87f0-11eb-9f33-8bb88c06f314.mp4