-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
profiler: wrap delta profiling in a type (#1483)
Wrap up delta profiling in a type with a Delta method. This type holds any information about the previous profile needed to compute the delta with the newest profile. The profiler keeps an instance of type for each profile type which supports delta profiling. This better encapsulates the implementation details of delta profiling, and facilitates upcoming implementation changes. As part of this change, pull the logic for merging in "extra" profiles out of the delta profiling code path. This logic was implemented for C allocation profiling, and the extra data was passed through to delta profiling mainly for efficiency. However, merging in extra data is orthogonal to delta profiling and we can find other ways to make that more efficient if we need to. Change the Delta field of profileType to DeltaValue, a list of values for which to compute deltas. A length-0 DeltaValue means that the profile type doesn't support delta profiles. This gets rid of the overloaded meaning of Delta == nil meaning "do nothing" and len(Delta.SampleTypes) == 0 mean "do everything".
- Loading branch information
Showing
5 changed files
with
105 additions
and
82 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
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