-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add test for profiler inlining #60225
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
Conversation
|
Tagging subscribers to this area: @tommcdon Issue DetailsWe found out recently (#59741) that we have no coverage for whether the runtime respects the profiler's request to prevent or allow inlining. This adds some basic tests
|
tommcdon
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.
LGTM, one minor comment for your review
| Console.WriteLine($"Inlining, x={x}"); | ||
| } | ||
|
|
||
| [MethodImpl(MethodImplOptions.NoInlining)] |
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.
Minor Nit: Do we mean to block inlining via attribute on this method? It seems we want to verify that the profiler is making the decision to block inlining for this function.
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.
Looking at the test I think the only method where David intended to modify the inlining behavior from the profiler is "Inlinee". For all other methods we are just ensuring they don't unintentionally get inlined so that the test will get enter/exit callbacks for them.
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.
Yeah, what Noah said 😄. I should have called this method "Inliner" and not "Inlining". I think it's actually worth updating for clarity
noahfalk
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.
LGTM!
Are you able to run this test against any .NET 6 build without your recent fixes and confirm the test fails?
I can now confirm that it fails when targeting 6.0-rc1 |
|
@davmason I think this change is causing my PR to fail in the GCC build: |
|
@BruceForstall interesting, do you know why that leg didn't run on this PR? It looks like it should be an easy fix, I'm taking a look |
The GCC leg was skipped in this PR because it is currently only triggered when src/coreclr has changed. Since src/tests and src/native also takes part in what gcc leg builds, we should adjust this condition: runtime/eng/pipelines/runtime.yml Line 111 in 55984c8
to include: eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), |
|
The issue I ran into was where different CI machines had either gcc version 9 or 11. A particular codegen change was failing only on 11, so that can cause discrepancy in job failures. Dont think we looked into it further to determine why the versions are different. |
|
It was because that other PR was sitting there for over a month and merged without re-running the CI, and during that time gcc leg was updated from v9 to v11. |
We found out recently (#59741) that we have no coverage for whether the runtime respects the profiler's request to prevent or allow inlining. This adds some basic tests