-
Notifications
You must be signed in to change notification settings - Fork 65
Add option of retainOnlyTopFiles to jit-analyze #347
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
Add option of retainOnlyTopFiles to jit-analyze #347
Conversation
|
@dotnet/jit-contrib , @BruceForstall - any thoughts? |
BruceForstall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea seems good. Some comments/suggestions:
- We already have a list of the base/diff files (
baseList/diffListinMain) in a FileInfo list, that includes the full path. Those paths are copied into theFileDeltastructure. So it seems like we shouldn't do a directory search for files to delete, we should use the file paths we already have. - What if you initialize a member of FileInfo (or FileDelta),
retain = false, only used if theretainoption is used, set it totruein theDisplayFileMetriccode, then simply iterate over the lists towards the end ofMaindeleting files where this isfalse? - Nit: name arg
-retainOnlyTopFilesinstead? Why? "Diff" implies it wouldn't delete "Base" files (which it would/should). "Top" implies the highest metric value, which might not be the "biggest". Maybe even more general: "-retainReportedFiles", meaning to retain any files on which we report a regression/improvement. We might choose to report both the largest, weighted, code size diffs. But we might also want to report the smallest, which are often the easiest to analyze. In fact, for the purpose of saving things in the CI, it would be quite useful to include both those sets.
|
Done. |
|
Related PR where this option will be consumed - dotnet/runtime#61700 |
I will keep that as a future improvement. Let us monitor and see how big the size of top (largest) subset is and if there is a need to see at smaller subset. I usually just pick the smallest of the top files that are reported. |
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
RetainBigDiffFilesOnlywill makejit-analyzeto delete the.dasmfiles and retain just the topcountfiles that contains largest diffs. This will help us in reducing the.dasmfiles size when we upload them as part of CI. By default, this option is off and hence we will never delete those files.Thoughts?