RFR: 8263006: Add optimization for Max(*)Node and Min(*)Node [v2]

Marcus G K Williams github.com+168222+mgkwill at openjdk.java.net
Thu Apr 22 02:18:24 UTC 2021


On Thu, 22 Apr 2021 01:49:07 GMT, Wang Huang <whuang at openjdk.org> wrote:

> > Running MyBenchmark test listed in the summary on x86_64 Haswell XEON with this patch results in:
> > ```
> > # Benchmark: org.sample.MyBenchmark.testMax
> > 
> > # Run progress: 25.00% complete, ETA 00:03:57
> > # Fork: 1 of 1                                                                                                                                                              # Warmup Iteration   1: 112.714 us/op
> > # Warmup Iteration   2: # To suppress the following error report, specify this argument
> > # after -XX: or in .hotspotrc:  SuppressErrorAt=/register.hpp:152                                                                                                           #
> > # A fatal error has been detected by the Java Runtime Environment:
> > #
> > #  Internal Error (/home/mgkwill/src/git/jdk/src/hotspot/share/asm/register.hpp:152), pid=3450238, tid=3450253
> > #  assert(a != b && a != c && a != d && a != e && b != c && b != d && b != e && c != d && c != e && d != e) failed: registers must be different: a=0x0000000000000001, b=0x0000000000000001, c=0x0000000000000003, d=0x0000000000000004, e=0x0000000000000005
> > #
> > # JRE version: OpenJDK Runtime Environment (17.0) (slowdebug build 17-internal+0-adhoc.mgkwill.jdk) 
> > ```
> > 
> > 
> > AND
> > ```
> > # Benchmark: org.sample.MyBenchmark.testMin
> > 
> > # Run progress: 25.00% complete, ETA 00:03:57
> > # Fork: 1 of 1
> > # Warmup Iteration   1: 112.445 us/op
> > # Warmup Iteration   2: # To suppress the following error report, specify this argument
> > # after -XX: or in .hotspotrc:  SuppressErrorAt=/register.hpp:152
> > #
> > # A fatal error has been detected by the Java Runtime Environment:
> > #
> > #  Internal Error (/home/mgkwill/src/git/jdk/src/hotspot/share/asm/register.hpp:152), pid=3450444, tid=3450481
> > #  assert(a != b && a != c && a != d && a != e && b != c && b != d && b != e && c != d && c != e && d != e) failed: registers must be different: a=0x0000000000000001, b=0x0000000000000001, c=0x0000000000000003, d=0x0000000000000004, e=0x0000000000000005
> > #
> > # JRE version: OpenJDK Runtime Environment (17.0) (slowdebug build 17-internal+0-adhoc.mgkwill.jdk)
> > ```
> > 
> > 
> > Otherwise the results are below.
> > ```
> > Baseline
> > Benchmark            Mode  Cnt    Score     Error  Units
> > MyBenchmark.testAdd  avgt    5  149.581 ?  13.626  us/op
> > MyBenchmark.testMax  avgt    5  223.362 ? 195.007  us/op
> > MyBenchmark.testMin  avgt    5  206.096 ?  16.840  us/op
> > MyBenchmark.testMul  avgt    5  149.366 ?   9.558  us/op
> > Finished running test 'micro:MyBenchmark'
> > ```
> > 
> > 
> > ```
> > Benchmark            Mode  Cnt    Score   Error  Units
> > MyBenchmark.testAdd  avgt    5  107.874 ? 0.148  us/op
> > MyBenchmark.testMul  avgt    5  107.881 ? 0.015  us/op
> > Finished running test 'micro:MyBenchmark'
> > ```
> 
> > MyBenchmark.testAdd  avgt    5  149.581 ?  13.626  us/op
> > MyBenchmark.testMax  avgt    5  223.362 ? 195.007  us/op
> > MyBenchmark.testMin  avgt    5  206.096 ?  16.840  us/op
> > MyBenchmark.testMul  avgt    5  149.366 ?   9.558  us/op
> 
> I run this test case by `java -jar target/benchmarks.jar -i 10 -wi 10 -f 1 `on ` Intel(R) Xeon(R) CPU E7-8890 v4 @ 2.20GHz` without crash. Can you give me your jvm options and this crash log? Thank you very much.

Certainly. Tomorrow morning (my time) I will re-run with your command and test on a few other Xeons. I need to re-run to get crash logs (I'm jumping around between patches and cleaned already) but I will post those when I can recreate.

To run I copied MyBenchmark.java from summary to test/micro/org/openjdk/bench/vm/compiler/MyBenchmark.java
Command on running was:
`make test TEST="micro:MyBenchmark" MICRO="FORK=1;WARMUP_ITER=2;" CONF=linux-x86_64-server-slowdebug`

This worked on master, but on checkout of pr/3513 caused the errors above.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3513


More information about the hotspot-compiler-dev mailing list