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

Test failure in JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh #32733

Closed
v-haren opened this issue Feb 24, 2020 · 1 comment · Fixed by #40056
Closed

Test failure in JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh #32733

v-haren opened this issue Feb 24, 2020 · 1 comment · Fixed by #40056
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI area-crossgen2-coreclr
Milestone

Comments

@v-haren
Copy link

v-haren commented Feb 24, 2020

failed in job: runtime-coreclr crossgen2 outerloop 20200222.1

Error message
\ncmdLine:/home/helixbot/work/B79909FA/w/BBBE0A3C/e/JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh Timed Out\n\nReturn code: -100\nRaw output file: /home/helixbot/work/B79909FA/w/BBBE0A3C/e/JIT/jit64/Reports/JIT.jit64/opt/cse/HugeArray1/HugeArray1.output.txt\nRaw output:\nBEGIN EXECUTION\nin takeLock\nWarning: No files matching /home/helixbot/work/B79909FA/w/BBBE0A3C/e/JIT/jit64/opt/cse/HugeArray1/*.dll\n\ncmdLine:/home/helixbot/work/B79909FA/w/BBBE0A3C/e/JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh Timed Out\nTest Harness Exitcode is : -100\nTo run the test:\n> set CORE_ROOT=/home/helixbot/work/B79909FA/p\n> /home/helixbot/work/B79909FA/w/BBBE0A3C/e/JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh\nExpected: True\nActual: False

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 24, 2020
@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label Apr 10, 2020
@mangod9 mangod9 added this to the 5.0 milestone Apr 10, 2020
@davidwrighton davidwrighton self-assigned this Jul 2, 2020
@davidwrighton
Copy link
Member

davidwrighton commented Jul 29, 2020

This is caused by pathological behavior in Compiler::optValnumCSE_Index. In particular, the optCSEhash can grow an unbounded amount if the function has numerous trees which are put into the optCSEhash as possible CSE candidates, but fewer than MAX_CSE_CNT are found, then the compiler will spend excessive amounts of time looking up entries in the optCSEhash. I've prototyped a change which makes the optCSEhash grow its bucket count, which address the performance concern here. This issue only reproduces for this test when running crossgen2 with optimizations enabled. Also the slowdown has been much more visible on Linux. Presumably, that perturbs the codegen to some interesting degree.

In this particular case, the hashtable grows to over 524288 elements, and the current bucket count is 128, thus leading to significant slowdown.

With the prototype fix (PR #40056) compilation on my machine goes from 5 minutes to 9.5 seconds.

@davidwrighton davidwrighton added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 29, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI area-crossgen2-coreclr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants