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 New Test to Track Number of Jitted Methods #91235

Merged
merged 24 commits into from
Sep 25, 2023

Conversation

ivdiazsa
Copy link
Member

Addresses issue #88533. This PR adds a new test that monitors the number of jitted methods in a simple console app. The purpose is to catch big methods regressions faster.

@ghost
Copy link

ghost commented Aug 28, 2023

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

Addresses issue #88533. This PR adds a new test that monitors the number of jitted methods in a simple console app. The purpose is to catch big methods regressions faster.

Author: ivdiazsa
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: -

@ivdiazsa ivdiazsa added this to In Progress in Infrastructure Backlog Aug 28, 2023
@ivdiazsa ivdiazsa added this to the 9.0.0 milestone Aug 28, 2023
@ivdiazsa ivdiazsa linked an issue Aug 28, 2023 that may be closed by this pull request
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivdiazsa ivdiazsa marked this pull request as ready for review August 29, 2023 16:33
@ivdiazsa ivdiazsa requested a review from trylek August 29, 2023 16:33
@ivdiazsa
Copy link
Member Author

@trylek I had problems with my old fork and had to make a new one, hence a new PR. PTAL

tree after running the tests, and adjusted the pipelines
configuration to only run that one.
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 29, 2023
other jobs. Disabled the runtime pipeline entirely, and only kept the
relevant outerloop platforms for my change to save resources.
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Commands, and disabled the dev-innerloop pipeline to further speed up
this testing and debugging process.
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 30, 2023
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Aug 30, 2023
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivdiazsa ivdiazsa marked this pull request as draft August 31, 2023 18:35
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@trylek
Copy link
Member

trylek commented Sep 11, 2023

Please do make sure to remove all instrumentation from the yml scripts, most notably I don't see why this PR should be changing eng/pipelines/ci.yml.

@ivdiazsa
Copy link
Member Author

Please do make sure to remove all instrumentation from the yml scripts, most notably I don't see why this PR should be changing eng/pipelines/ci.yml.

Good catch. Those changes must have filtered at some point during one of the rebases with main. Will remove them.

@ivdiazsa
Copy link
Member Author

Sigh... Windows is causing problems again... Investigating those failures now.


// For adding any new apps for this test, make sure they return a negative
// number when failing.
int appResult = RunHelloWorldApp(appName);
Copy link
Member

Choose a reason for hiding this comment

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

The setup with the app running in a separate process made sense when the test used JIT logging to get the method count.

This setup is overkill now that the test just calls GetCompiledMethodCount and checks its value. Would it be better to turn this into an ordinary single process test that just calls GetCompiledMethodCount and checks its value (and skipping the check in specific environments)?

Copy link
Member Author

@ivdiazsa ivdiazsa Sep 12, 2023

Choose a reason for hiding this comment

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

Actually, this makes a lot of sense. I just tested it on my local machine and I'm getting 4 jitted methods instead of the 1 I used to get with the solo HelloWorld app. Since the number of jitted methods is very similar, does it make sense to you to do it like this instead @trylek?

some small bad merges in the CI files when rebasing.
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Sep 18, 2023
@dotnet dotnet deleted a comment from azure-pipelines bot Sep 18, 2023
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

dotnet app to be fully prejitted, and therefore show 0 jitted methods,
so added that case to the test.
@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivdiazsa
Copy link
Member Author

Failures are unrelated. Merging this now

@ivdiazsa ivdiazsa merged commit dc5225d into dotnet:main Sep 25, 2023
196 of 200 checks passed
Infrastructure Backlog automation moved this from In Progress to Closed Sep 25, 2023
@@ -140,7 +140,14 @@ FCIMPLEND
FCIMPL1(INT64, GetCompiledMethodCount, CLR_BOOL currentThread)
{
FCALL_CONTRACT;

// WIP-DEBUG-ONLY change: Windows is causing problems in the CI, but can't
Copy link
Member

Choose a reason for hiding this comment

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

This WIP code needs to be reverted!

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I forgot! Good catch, Jan. I will submit a PR fixing that right away.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

R2R: Add a CI or perf validation for # of methods jitted
3 participants