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

Correct total times in recursions #90

Closed
mo-mglover opened this issue Apr 25, 2023 · 0 comments · Fixed by #93
Closed

Correct total times in recursions #90

mo-mglover opened this issue Apr 25, 2023 · 0 comments · Fixed by #93

Comments

@mo-mglover
Copy link
Collaborator

When routines are called recursively, the total time is incremented in an unsuitable way: at the end of the routine/region. The innermost calls thus increment the total time, as does the next call up, and so on. In this manner, time spent in the innermost calls is added to the total time many times over: one for each call level.

Issue #28 also touches on this, but that's of wider scope. For the moment though, doing one of the following will likely be a small, contained changeset:

  1. Sorting out the calling levels, or
  2. Just getting the total time correct.

I'm thinking that we store the recursion level in a RegionRecord and increment / decrement as appropriate. We can then either:

  1. Take the recursion level into the hash, thus separating out the different recursion levels in the profiler, or
  2. Only increment the total time of the recursion level gets back to 0.

[This depends on changes in PR #77 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant