Profiler: Fix visual profiler showing inaccurate times for categories #120914
Open
VeryKurz wants to merge 3 commits into
Open
Profiler: Fix visual profiler showing inaccurate times for categories #120914VeryKurz wants to merge 3 commits into
VeryKurz wants to merge 3 commits into
Conversation
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Member
|
The time from swap buffers shouldn't be included at all (either in the graph or the side panel) So this actually makes the problem worse. |
Author
If swap buffers shouldn't be included, the Graph could be changed to ignore closing Categories, as the Overview does in master. Additionally the Categories opening time could also be ignored in both Graph and Overview, since Categories aren't clickable, or selectable and from my experience don't add more then ~0.1 ms to the total time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem(s) does this PR solve?
Additional information
This PR adds time to the GPU and CPU times, which is rendered in the Graph but is missing in the overview:
For reproduction and further explanation of the issue please read the issue and especially this comment:
#97854 (comment)
Issues and uncertainties with this PR
Areas in the Graph, which are associated with a Category instead of an Item aren't clickable in the Graph. This might cause confusion for the User.
A new TimeStamp could be added which encapsulates swap_buffer() and its surrounding functions. This shows the user more transparently what is happening in the Visual Profiler and would make the specific Area from Unexplained Blue Area on Visual Profiler in Compatibility Renderer #97854 clickable and explained.
The for loop in the commit is copied from a few lines below it. Instead of having duplicate code, an if statement could be added after that loop, which would just continue. I didn't do this because I think the current version is easier to read.
This PR adds the time from closing Categories to it's parent Categories, but not to itself. This makes the most sense in my opinion, but the color displayed in the graph for this time still belongs to the closing category. This is probably not a big issue since the color of categories is not displayed in the overview, so Categories aren't associated with specific colors from the viewpoint of the user.
##Disclaimers
This is my first PR, hopefully it's enough/ not to much information.
No AI was used in this PR or the code.