More performance explorations
Ola Bini
ola.bini at gmail.com
Sat Jun 4 05:19:56 PDT 2011
On 2011-06-04 01.47, John Rose wrote:
> On Jun 3, 2011, at 7:07 AM, Ola Bini wrote:
>
>> Is there anything I can do to help out with finding this problem?
>
> I can't reproduce the VM crash yet. Like Christian, I got through
> problems 1 and 2, on bsd (both 32-bit and 64-bit).
>
> Problem 3 generates huge output, so it's hard to see what's going on.
> It is running on my machine but seems to take forever. FWIW, it got
> through this line at least: - (small numbers)
> 39.867609000
>
> It would help to have a smaller test case, preferably one that
> doesn't generate any output before the crash.
Hi,
In order to generate the newest crash you can check out the master of
Seph and just run ant. That doesn't crash on bsdport+mlvm for me, but it
does crash on my JDK7 build on Linux 64bit.
Cheers
>
> -- John
>
> On May 24, 2011, at 8:58 PM, Ola Bini wrote:
>
>> Hi,
>>
>> There are at least three problems that are still there. They might
>> be connected, or not. (I will tell you how to reproduce these at
>> the end)
>>
>> I just built a new JVM: openjdk version "1.7.0-internal" OpenJDK
>> Runtime Environment (build
>> 1.7.0-internal-olabini_2011_05_25_08_06-b00) OpenJDK Server VM
>> (build 21.0-b09, mixed mode)
>>
>> I get that weird missing class error when running my test suite:
>> java.lang.NoClassDefFoundError: seph/lang/SephObject
>> java.lang.RuntimeException: java.lang.NoClassDefFoundError:
>> seph/lang/SephObject at
>> seph.lang.Runtime.evaluateStream(Runtime.java:132) at
>> seph.lang.Runtime.evaluateString(Runtime.java:146) at
>> seph.lang.code.BasicSanityTest.recursive_odd_and_even_that_should_blow_the_stack(BasicSanityTest.java:214)
>>
>>
Caused by: java.lang.NoClassDefFoundError: seph/lang/SephObject
>> at java.lang.invoke.MethodHandle.invokeExact(MethodHandle.java) at
>> java.lang.invoke.MethodHandle.invokeExact(MethodHandle.java) at
>> seph$gen$abstraction$41$even?.argument_0_0(<eval>:7) at
>> seph.lang.compiler.Bootstrap.intrinsic_if(Bootstrap.java:654) at
>> seph$gen$abstraction$41$even?.even?(<eval>:7) at
>> seph$gen$abstraction$39$toplevel.toplevel(<eval>:25) at
>> seph.lang.Runtime.evaluateStream(Runtime.java:125)
>>
>> This is obviously a complete blocker.
>>
>> Turning off the ricochet frames hits an NYI error when running the
>> test suite.
>>
>> I'm still seeing a crash in ricochet frames: # # A fatal error has
>> been detected by the Java Runtime Environment: # # SIGBUS (0xa) at
>> pc=0x0104884f, pid=85043, tid=2953850880 # # JRE version: 7.0 #
>> Java VM: OpenJDK Client VM (21.0-b09 mixed mode bsd-x86 ) #
>> Problematic frame: # V [libjvm.dylib+0x4884f]
>> MethodHandles::ricochet_frame_oops_do(frame const&, OopClosure*,
>> RegisterMap const*)+0x12f # # Failed to write core dump. Core dumps
>> have been disabled. To enable core dumping, try "ulimit -c
>> unlimited" before starting Java again # # An error report file with
>> more information is saved as: #
>> /Users/olabini/workspace/seph/hs_err_pid85043.log # # If you would
>> like to submit a bug report, please visit: #
>> http://bugreport.sun.com/bugreport/crash.jsp #
>>
>> I've attached the error file.
>>
>> The third error (in frame.cpp) only happens on master of seph, but
>> there are some other problems with master that means you get lots
>> of weird output.
>>
>> In order to reproduce problem 1 and 2: git clone
>> git://github.com/seph-lang/seph.git git checkout
>> 9075c0f4ffe1adac0657057aee2193f16ad12a43 (build.xml: remove lines
>> with <jvmarg value="-Xint"/>)
>>
>> problem 1: ant This should show you one entry of the missing class
>> problem
>>
>> problem 2: ant jar-notest bin/seph bench/bench_arithmetic.sp This
>> should show you problem 2. If you for reference want to see the
>> benchmark run correctly, do bin/seph -J-Xint
>> bench/bench_arithmetic.sp
>>
>> problem 3: git checkout master git checkout
>> 99c8f2609d468835390e39b68c73f21cc78e5ab5 ant clean jar-notest
>> bin/seph bench/bench_arithmetic.sp This should show you problem 3.
>> You will also see loads of other exceptions, since that point
>> generates slightly bad bytecode. That shouldn't make the JVM crash
>> though, I assume - and I've seen the frame.cpp should not reach
>> here without seeing those exceptions.
>>
>> All of these require that JAVA_HOME points to the Java 7 you want
>> to use
>>
>> Cheers
>>
>>>
>>> tom
>>>
>>> On May 23, 2011, at 7:33 PM, Ola Bini wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm happy to see that the performance degradation is getting
>>>> addressed. I would like to point out that there is still a
>>>> serious crash in the machinery too... Have you seen any reason
>>>> why that happens?
>>>>
>>>> Cheers
>>>>
>>>>
>>>> On 2011-05-24 06.11, John Rose wrote:
>>>>> On May 23, 2011, at 3:44 PM, Tom Rodriguez wrote:
>>>>>
>>>>>>> I'd *love* for intermediate static Java snippits like
>>>>>>> this to inline straight through, even if invokeExact
>>>>>>> would be megamorphic under normal circumstances...but I
>>>>>>> don't think that's the case right now, right?
>>>>>>
>>>>>> I haven't been following 292 that closely but it used to be
>>>>>> a piece of code that did precisely that.
>>>>>>
>>>>>> + private Object invoke_L0() throws Throwable { +
>>>>>> if ((boolean) test.invokeExact()) + return
>>>>>> target.invokeExact(); + return
>>>>>> fallback.invokeExact(); + }
>>>>>>
>>>>>> It looks like it was reworked at some point to use
>>>>>> selectAlternative but the optimizer was never updated to
>>>>>> deal with it properly. It's not particularly hard, we just
>>>>>> need to generate code like we would for a bimorphic call
>>>>>> site. The current code expects to either get a constant or
>>>>>> something else and doesn't inline if it's something else.
>>>>>> In this case we have a Phi of two constants which we just
>>>>>> need to split.
>>>>>
>>>>> Yes, it would be a quasi-bimorphic call site keyed from a phi
>>>>> of two constants, instead of a profile of two receiver
>>>>> classes.
>>>>>
>>>>>> I'm still unclear why you couldn't write your own variant
>>>>>> of guardWithTest and have it work but my knowledge of
>>>>>> what's really allowed is somewhat limited.
>>>>>
>>>>> Those snippets will inline (I think), but at some point
>>>>> Charlie will want to fetch a bit of constant stuff out of an
>>>>> instance variable. That will look non-constant to the
>>>>> optimizer, even if the instance variable is final and the
>>>>> enclosing object is a constant reference. We made sure this
>>>>> happens for java.lang.invoke classes, but we haven't extended
>>>>> it yet to user code, in part because it would have its own
>>>>> bug tail to work through.
>>>>>
>>>>> -- John _______________________________________________
>>>>> mlvm-dev mailing list mlvm-dev at openjdk.java.net
>>>>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>>>>>
>>>>
>>>>
>>>> -- Ola Bini (http://olabini.com) Ioke - JRuby - ThoughtWorks
>>>>
>>>> "Yields falsehood when quined" yields falsehood when quined.
>>>>
>>>> _______________________________________________ mlvm-dev
>>>> mailing list mlvm-dev at openjdk.java.net
>>>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>>>
>>> _______________________________________________ mlvm-dev mailing
>>> list mlvm-dev at openjdk.java.net
>>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>>>
>>
>>
>> -- Ola Bini (http://olabini.com) Ioke - JRuby - ThoughtWorks
>>
>> "Yields falsehood when quined" yields falsehood when quined.
>>
>> <hs_err_pid85367.log>_______________________________________________
>>
>>
mlvm-dev mailing list
>> mlvm-dev at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
>
>
--
Ola Bini (http://olabini.com)
Ioke - JRuby - ThoughtWorks
"Yields falsehood when quined" yields falsehood when quined.
More information about the mlvm-dev
mailing list