jaotc: unexpected long compile time for a 3012-byte generated class

Tianxiao Gu tianxiao.gu at gmail.com
Wed Jan 24 20:04:39 UTC 2018


Thanks, Doug.

I agree with you. The fatal error indicates that the C2 compiler may
generate problematic code for a method (see below) of graal, when graal
itself has been driven to a crazy state by the input C0.class.
I will file an issue with another class that does not end with a fatal
error of the runtime but still leads to a long compile time.

Stack: [0x00007f29a22c2000,0x00007f29a23c3000],
sp=0x00007f29a23c06d0,  free space=1017k
Native frames: (J=compiled Java code, A=aot compiled Java code,
j=interpreted, Vv=VM code, C=native code)
J 3623% c2 org.graalvm.compiler.phases.schedule.SchedulePhase$Instance.scheduleEarliestIterative(Lorg/graalvm/compiler/core/common/cfg/BlockMap;Lorg/graalvm/compiler/graph/NodeMap;Lorg/graalvm/compiler/graph/NodeBitMap;Lorg/graalvm/compiler/nodes/StructuredGraph;Z)V
jdk.internal.vm.compiler (999 bytes) @ 0x00007f2a04f371a2
[0x00007f2a04f368e0+0x00000000000008c2]
j


On Wed, Jan 24, 2018 at 3:02 AM, Doug Simon <doug.simon at oracle.com> wrote:

> Hi Tianxiao,
>
> As far as I'm aware, Graal compiled code does not run during jaotc so I
> don't think the crash is Graal related. It's in a C2 compiled method.
>
> That said, the long compile time is almost certainly some issue in Graal.
> Looking at the class file, it seems like some inlining maybe be going crazy
> on the infinitely recursive C0.M0() method and I can confirm this with:
>
> jaotc -J-Dgraal.TraceInlineDuringParsing=true C0.class
>
> Can you please file an issue at https://github.com/oracle/graal/issues
> and we will investigate further.
>
> -Doug
>
> > On 24 Jan 2018, at 09:00, Tianxiao Gu <tianxiao.gu at gmail.com> wrote:
> >
> > Hi All,
> >
> > I found some abnormal behavior of jaotc. It takes 23 minutes for jaotc
> (head) to compile a 3012-byte generated class file (C0.class)
> > and jaotc ends with a fatal error. I have managed to reproduce this
> issue on my machine for 4 times.
> >
> > Related files are hosted on Google Drive:
> >
> > https://drive.google.com/open?id=1u9O3uPkvucX6PWQkMFER3NAUWIR_KglE
> >
> > Reproducing Steps:
> >
> > jaotc --output C0.so C0.class
> >
> > Environment:
> >
> > `java --version`
> >
> > openjdk 10-internal 2018-03-20
> > OpenJDK Runtime Environment (build 10-internal+0-adhoc.t.jdk)
> > OpenJDK 64-Bit Server VM (build 10-internal+0-adhoc.t.jdk, mixed mode)
> >
> > `lscpu`
> >
> > Architecture:          x86_64
> > CPU op-mode(s):        32-bit, 64-bit
> > Byte Order:            Little Endian
> > CPU(s):                8
> > On-line CPU(s) list:   0-7
> > Thread(s) per core:    2
> > Core(s) per socket:    4
> > Socket(s):             1
> > NUMA node(s):          1
> > Vendor ID:             GenuineIntel
> > CPU family:            6
> > Model:                 158
> > Model name:            Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
> > Stepping:              9
> > CPU MHz:               900.000
> > CPU max MHz:           4200.0000
> > CPU min MHz:           800.0000
> > BogoMIPS:              7200.00
> > Virtualization:        VT-x
> > L1d cache:             32K
> > L1i cache:             32K
> > L2 cache:              256K
> > L3 cache:              8192K
> > NUMA node0 CPU(s):     0-7
> > Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
> pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
> syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts
> rep_good nopl xtopology nonstop_tsc aperfmperf tsc_known_freq pni pclmulqdq
> dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid
> sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c
> rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority
> ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx
> rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat
> pln pts hwp hwp_notify hwp_act_window hwp_epp
> >
> > `uname -a`
> >
> > Linux xtiger 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180124/94b9f7ed/attachment.html>


More information about the hotspot-compiler-dev mailing list