Conversation

edited

This PR changes the way we hide idle threads. With the new category information, we can now know if a sample is idle or not. This change removes the previous guesses about not having RefreshDriverTicks in a main thread and generalizes the notion of an idle thread, so that it works for all sorts of threads.

This comment has been minimized.

Nit: This is super minor since the comment above points out that the first branch will likely never happen, and the scenario I'm pointing out here is even less likely to happen.

But, if maxActiveStackCount is reduced in the loop, it will only be acted on in the second branch, and so if all remaining iterations in the loop enters the first branch (that is, all remaining samples are filtered), it is possible that the threshold could be breached as the limit shrinks, but it never hits the return false since the loop is exited before that. Replacing this line with return activeStackCount <= maxActiveStackCount would account for that scenario.

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.