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.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow CppLinkAction to inspect input sizes in resource estimation #19203
Allow CppLinkAction to inspect input sizes in resource estimation #19203
Changes from 2 commits
e19b541
ab31c6b
27994c4
641c671
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
let's not swallow Exceptions en bloc. Either only swallow
IOException
(worse) or re-throw it wrapped intoExecException
(better)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 reason for swallowing exceptions here was that the input sizes aren't used yet, so it seems too heavy-handed to fail hard if something goes wrong. The idea was to have this in place first to measure linker behavior by looking at the logs, and once we have data and a better model, we can put it in place (and then make this a hard failure once we have observed no failures).
I've changed the code to catch
IOException
(the broadException
was a left-over from a previous draft) and added a TODO.What do you think?
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.
I don't have a strong opinion here; I'd prefer failing hard because if
stat()
doesn't work on an input file, the action will very likely not succeed anyway (every input file must be checksummed so that the action checksum can be computed).A mitigating factor is that this
IOException
only ever happens if I/O is needed to get the metadata, which AFAIU only ever happens during action input discovery, which is not something link actions do so arguably the way this exception is handled is only a theoretical concern.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.
Late to the party - do you need this log for every link action or is it ok to get a sample? I am asking because this seems to cause a bit of log spam when looking at large builds.
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.
Oops, sorry for the late reply.
Yes, I kinda needed it for every link action. If I look at our build, there are lots and lots of small link actions, but towards the end of the build, there are only a few large ones, each with a different memory "profile". If I were to sample these, I'd lose valuable information at that stage.
Is this still a problem after @lberki 's change to decrease the logging level?