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

Add CopyUpToDate ETW #6661

Merged
merged 7 commits into from
Aug 16, 2021
Merged

Add CopyUpToDate ETW #6661

merged 7 commits into from
Aug 16, 2021

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented Jul 9, 2021

Progress towards #6658

Adds an up-to-date ETW for the Copy task. Also captures metadata copying just because that happens if it was up-to-date. (Should we have a check rather than always copying?)

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right place for these events, to catch the "incremental build copying the same outputs to the same locations" case? I naïvely assumed it would be in DoCopyIfNecessary.

@Forgind
Copy link
Member Author

Forgind commented Jul 12, 2021

The part I put ETW traces around looks like "the file at destination was copied from source." DoCopyIfNecessary has "files are the same size and timestamp" and "files have the same name." There's a fourth check buried in DoCopyWithRetries that does a deep file comparison.

Looking at those four, the first sounded sufficient for if it's just an incremental build, and I stopped there because there deeper I try to push it, the more complicated it gets. This is a simple check with no code movement. To add the next level, I'd need three possible ending places, one of which is currently also executed when actually copying, so I would need a little extra control logic there. The last check is in a catch. I think it would be impossible to hit without capturing copies as well without substantial code changes.

I can check to see if my assumption about the first being sufficient is true or just put in the change to capture the first two levels. I don't think it's worth it to try for the third.

@rainersigwald
Copy link
Member

I can check to see if my assumption about the first being sufficient is true

Sounds like a plan.

@@ -561,6 +568,10 @@ int parallelism
success = false;
}
}
else
{
MSBuildEventSource.Log.CopyUpToDateStop(destItem.ItemSpec);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify whether it was up to date or not

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Aug 16, 2021
@Forgind Forgind merged commit d01fb22 into dotnet:main Aug 16, 2021
@Forgind Forgind deleted the copy-etw branch August 16, 2021 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants