-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sampler: do not share sampling state across function calls (#73)
This PR is another follow-up from #71, which contains two fixes: The first fix consists in not applying the sampling scale to time measures of the CPU profiler. This is needed because the time deltas between call and return of functions are not affected by the sampling rate, it's an absolute value. The second fix changes the sampling mechanism to track state per function instead of sharing it across all functions, which was causing too much skew. We now record `1 / sample rate` calls to each function instead of `1 / sample rate` function calls, which gives a much more accurate profiles. --------- Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
- Loading branch information
1 parent
10325f4
commit 5b5fd15
Showing
5 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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