Skip to content

Conversation

@jakobbotsch
Copy link
Member

Instead of using the numeric value of each stress mode inside the enum calculate a hash based on the string name. This has the benefit that it won't change based on new members being added/reordered and reduces correlation of which stress modes get enabled together.

Fix #83733

Instead of using the numeric value of each stress mode inside the enum,
calculate a hash based on the string name. This has the benefit that it
won't change based on new members being added/reordered and reduces
correlation of which stress modes get enabled together.

Fix dotnet#83733
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 22, 2023
@ghost ghost assigned jakobbotsch Mar 22, 2023
@ghost
Copy link

ghost commented Mar 22, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

Instead of using the numeric value of each stress mode inside the enum calculate a hash based on the string name. This has the benefit that it won't change based on new members being added/reordered and reduces correlation of which stress modes get enabled together.

Fix #83733

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jakobbotsch
Copy link
Member Author

Looks like this exposes some new stress related issue:

Assertion failed '(emitThisGCrefRegs & regMask) == 0' in 'System.String:Concat[ushort](System.Collections.Generic.IEnumerable`1[ushort]):System.String' during 'Emit code' 

@jakobbotsch
Copy link
Member Author

The above issue also hits in libraries-jitstress-random, I opened #83963 for it. Will convert this to a draft until we get a fix for that.

@jakobbotsch jakobbotsch marked this pull request as draft March 27, 2023 15:03
@jakobbotsch jakobbotsch added the blocked Issue/PR is blocked on something - see comments label Mar 27, 2023
@jakobbotsch jakobbotsch closed this Apr 4, 2023
@jakobbotsch jakobbotsch reopened this Apr 4, 2023
@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

jakobbotsch added a commit to jakobbotsch/runtime that referenced this pull request Apr 5, 2023
With side effects that may go on top, it may be block morph's
responsibility to set this flag.

Also set the type of the reused GT_COMMA nodes; haven't actually seen
any issues here, but seems prudent to do this.

Fixes some stress issues seen over in dotnet#83771.
if (verbose)
{
printf("\n\n*** JitStress: %ws ***\n\n", s_compStressModeNames[stressArea]);
printf("\n\n*** JitStress: %s ***\n\n", s_compStressModeNames[stressArea]);
Copy link
Member Author

Choose a reason for hiding this comment

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

This also fixes this printf for PAL (it was just printing as "JitStress: %ws" on non-Windows builds)

jakobbotsch added a commit that referenced this pull request Apr 6, 2023
With side effects that may go on top, it may be block morph's
responsibility to set this flag.

Also set the type of the reused GT_COMMA nodes; haven't actually seen
any issues here, but seems prudent to do this.

Fixes some stress issues seen over in #83771.
@jakobbotsch
Copy link
Member Author

Stress failures should be fixed by #84352, will rerun...

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jakobbotsch
Copy link
Member Author

Currently blocked on #84758. The other failures look like #84696.

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jakobbotsch jakobbotsch reopened this Apr 25, 2023
@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jakobbotsch
Copy link
Member Author

Yay, stress is finally green. Going to remove the stress mode I pointed at in #85975 (comment) and then merge.

@jakobbotsch jakobbotsch marked this pull request as ready for review May 10, 2023 09:15
@jakobbotsch jakobbotsch removed the blocked Issue/PR is blocked on something - see comments label May 10, 2023
@jakobbotsch jakobbotsch merged commit c06191e into dotnet:main May 10, 2023
@jakobbotsch jakobbotsch deleted the stress-modes-seed-by-name branch May 10, 2023 11:15
@ghost ghost locked as resolved and limited conversation to collaborators Jun 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT: Reconsider how stress modes are randomly applied

2 participants