Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Moving CompileDeepTree_NoStackOverflowFast to the outer loop#19563

Merged
stephentoub merged 1 commit intodotnet:masterfrom
VSadov:fix18966
May 9, 2017
Merged

Moving CompileDeepTree_NoStackOverflowFast to the outer loop#19563
stephentoub merged 1 commit intodotnet:masterfrom
VSadov:fix18966

Conversation

@VSadov
Copy link
Member

@VSadov VSadov commented May 9, 2017

It appears that the test equally stresses the Expression Tree Compiler and the JIT compiler.

Normally this is not a problem since JIT compiler uses much less resources that ET compiler and 128Kb of stack is more than enough to JIT the resulting method.
That does not seem to be the case when running on Debug and the test may fail on debug runtime/JIT

We generally want the inner loop to pass on Debug though, so the test should be moved to the outer loop.

Fixes:#18966

 It appears that the test equally stresses the Expression Tree Compiler and the JIT compiler.

Normally this is not a problem since JIT compiler uses much less resources that ET compiler and 128Kb of stack is more than enough to JIT the resulting method.
That does not seem to be the case when running on Debug and the test may fail on debug runtime/JIT

We generally want the inner loop to pass on Debug though, so the test should be moved to the outer loop.
@VSadov
Copy link
Member Author

VSadov commented May 9, 2017

@stephentoub stephentoub merged commit 4ab9f71 into dotnet:master May 9, 2017
@VSadov
Copy link
Member Author

VSadov commented May 9, 2017

CC: @jaredpar

@JonHanna
Copy link
Contributor

JonHanna commented May 9, 2017

It may as well be deleted in this case. Its purpose is to be a quicker version of an outerloop test so that while not as thorough, it need not be outerloop.

@VSadov
Copy link
Member Author

VSadov commented May 10, 2017

@JonHanna - I have decided to keep it - since it is cheap.
Also it is an extra bit of information - if only small test fails vs. if both small and big one fail. This was one of the first questions in this bug - "are both tests failing?", So there is some benefit in having both.

@karelz karelz modified the milestone: 2.0.0 May 13, 2017
@seanshpark
Copy link

@VSadov , Thank you!

jakobbotsch added a commit to jakobbotsch/runtime that referenced this pull request May 27, 2021
The manually assigned 128 KiB stack here is bordering on the amount of
stack space that release JIT needs to JIT functions with deep trees.
Since the JIT already has a limit on the depth of trees it creates

https://github.com/dotnet/runtime/blob/44f050acc0f7791d6cd7ac772945444912bcf299/src/coreclr/jit/importer.cpp#L11234-L11252

it seems unnecessary to pressimize the JIT further to allow this test to
pass. Also, the test was originally added as a
faster equivalent to the test above it that could run in inner loop
(dotnet/corefx#14444), but it was subsequently
moved to outer loop (dotnet/corefx#19563), so
now it does not seem like there's much point in retaining it.

Fix dotnet#53309
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants