Regression for TraceTruffleCompilationDetails?

Christian Humer christian.humer at gmail.com
Wed Dec 18 07:03:08 PST 2013


Hi Stefan,

I gave it another try even so you did not provide me with a more robust
form for the command line. After I've hardcoded the Universe#fileSeparator
to a "/" I managed to at least run something [1] . After I've fixed the
class path provided in your -cp which is not where it should be if you do a
clean checkout from git I came up with this command line:

mx --vm server vm  -G:+TraceTruffleCompilationDetails
-Xbootclasspath/a:../TruffleSOM/build/classes;../TruffleSOM/libs/com.oracle.truffle.api.jar;../TruffleSOM/libs/com.oracle.truffle.api.dsl.jar
som.vm.Universe -cp ../TruffleSOM/core-lib/Smalltalk
../TruffleSOM/core-lib/Examples/Benchmarks/BenchmarkHarness.som IntegerLoop
1 2 2000

However I got this output on the console:
Warning: Primitive bitXor: is not in class definition for class Double
Exception in thread "main" java.lang.RuntimeException: This should not
happen in TruffleSOM
        at
som.interpreter.nodes.messages.BinarySendNode$UninitializedSendNode.createCachedNode(BinarySendNode.java:162)
        at
som.interpreter.nodes.messages.BinarySendNode$UninitializedSendNode.specialize(BinarySendNode.java:141)
        at
som.interpreter.nodes.messages.BinarySendNode$UninitializedSendNode.executeEvaluated(BinarySendNode.java:117)
        at
som.interpreter.nodes.messages.BinarySendNode.executeGeneric(BinarySendNode.java:58)
        at
som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:43)
        at
som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:1)
        at som.interpreter.Method.messageSendExecution(Method.java:89)
        at som.interpreter.Method.execute(Method.java:77)
        at
com.oracle.graal.truffle.OptimizedCallTarget.executeHelper(OptimizedCallTarget.java:214)
        at
com.oracle.graal.truffle.OptimizedCallTarget.interpreterCall(OptimizedCallTarget.java:143)
        at
com.oracle.graal.truffle.OptimizedCallTarget.callHelper(OptimizedCallTarget.java:98)
        at
com.oracle.graal.truffle.OptimizedCallTarget.call(OptimizedCallTarget.java:75)
        at
som.interpreter.nodes.messages.BinarySendNode$InlinableSendNode.executeEvaluated(BinarySendNode.java:233)
        at
som.interpreter.nodes.messages.BinarySendNode$CachedSendNode.executeEvaluated(BinarySendNode.java:86)
        at
som.interpreter.nodes.messages.BinarySendNode$UninitializedSendNode.executeEvaluated(BinarySendNode.java:117)
        at
som.interpreter.nodes.messages.BinarySendNode.executeGeneric(BinarySendNode.java:58)
        at
som.interpreter.nodes.messages.TernarySendNode.executeGeneric(TernarySendNode.java:60)
        at
som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:43)
        at
som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:1)
        at som.interpreter.Method.messageSendExecution(Method.java:89)
        at som.interpreter.Method.execute(Method.java:77)
        at
com.oracle.graal.truffle.OptimizedCallTarget.executeHelper(OptimizedCallTarget.java:214)
        at
com.oracle.graal.truffle.OptimizedCallTarget.interpreterCall(OptimizedCallTarget.java:143)
        at
com.oracle.graal.truffle.OptimizedCallTarget.callHelper(OptimizedCallTarget.java:98)
        at
com.oracle.graal.truffle.OptimizedCallTarget.call(OptimizedCallTarget.java:75)
        at
som.interpreter.nodes.messages.BinarySendNode$InlinableSendNode.executeEvaluated(BinarySendNode.java:233)
        at
som.interpreter.nodes.messages.BinarySendNode$CachedSendNode.executeEvaluated(BinarySendNode.java:86)
        at
som.interpreter.nodes.messages.BinarySendNode$UninitializedSendNode.executeEvaluated(BinarySendNode.java:117)
        at
som.interpreter.nodes.messages.BinarySendNode.executeGeneric(BinarySendNode.java:58)
        at
som.interpreter.nodes.messages.TernarySendNode.executeGeneric(TernarySendNode.java:60)
        at
som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:43)
        at
som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:1)
        at som.interpreter.Method.messageSendExecution(Method.java:89)
        at som.interpreter.Method.execute(Method.java:77)
        at
com.oracle.graal.truffle.OptimizedCallTarget.executeHelper(OptimizedCallTarget.java:214)
        at
com.oracle.graal.truffle.OptimizedCallTarget.interpreterCall(OptimizedCallTarget.java:143)
        at
com.oracle.graal.truffle.OptimizedCallTarget.callHelper(OptimizedCallTarget.java:98)
        at
com.oracle.graal.truffle.OptimizedCallTarget.call(OptimizedCallTarget.java:75)
        at com.oracle.truffle.api.CallTarget.call(CallTarget.java:62)
        at som.vmobjects.SMethod.invokeRoot(SMethod.java:86)
        at som.vm.Universe.execute(Universe.java:302)
        at som.vm.Universe.interpret(Universe.java:77)
        at som.vm.Universe.main(Universe.java:63)

Whats this? I stopped investigating at this point.

[1] Why didnt you just use the java.io.File API in the jdk to parse your
pathes?


Cheers,

- Christian Humer


On Mon, Dec 16, 2013 at 2:57 PM, Stefan Marr <java at stefan-marr.de> wrote:

> Hi Christian:
>
> Since I don’t know exactly whether there is anything Windows related going
> wrong, perhaps a few additional notes on my setup.
> I think, the standard problems should be that either the paths in the
> command line are not correct, or the git repo wasn’t checked out with its
> submodules:
>
> To clone the git repo of TruffleSOM with its submodules:
>   git clone --recursive https://github.com/smarr/TruffleSOM.git
>
> In contrast to other Truffle languages, TruffleSOM wasn’t yet adapted to
> the mx compilation infrastructure, but uses a simple ant script.
>
>  Executing `ant tests` should compile the necessary files and execute a
> simple test.
>  Note, it will download the necessary precompiled Truffle jars. I guess,
> that should work on Windows.
>
> Afterwards, it will depend on where your Graal folder is located.
>
> The command line assumes that it is in a folder next to TruffleSOM, so in
> the command line, `../TruffleSOM` would need to be replaced for other
> locations accordingly. Perhaps the path separators need to be changed for
> windows as well.
>
> > ./mx.sh --vm server vm  -G:+TraceTruffleCompilationDetails
> -Xbootclasspath/a:../TruffleSOM/build/classes:../TruffleSOM/libs/com.oracle.truffle.api.jar:../TruffleSOM/libs/com.oracle.truffle.api.dsl.jar
> som.vm.Universe -cp ../TruffleSOM/Smalltalk
> ../TruffleSOM/Examples/Benchmarks/BenchmarkHarness.som Loop 1 100 100
>
>
> After the mx.sh arguments, the bootclass path is set to include the
> Truffle libraries, as well as the compiled TruffleSOM classes (from  the
> build/classes folder).
> The main class of TruffleSOM is som.vm.Universe, `-cp` gives a class path
> to SOM to enabled to find its Smalltalk class library, and the main script
> to be executed is ../TruffleSOM/Examples/Benchmarks/BenchmarkHarness.som
> with a name for the benchmark and infos on how many iterations, and warmup
> cycles should be executed.
>
> Thanks for looking into the issue. I worked around it by just catching the
> exception for the moment.
>
> Best regards
> Stefan
>
> On 16 Dec 2013, at 11:51, Christian Humer <christian.humer at gmail.com>
> wrote:
>
> > Hi Stefan,
> >
> > Could you please provide a little more robust command line for the
> problem?
> > I just completely failed to run it on windows.
> >
> >
> > - Christian Humer
> >
> >
> > On Mon, Dec 16, 2013 at 11:13 AM, Stefan Marr <java at stefan-marr.de>
> wrote:
> > Hi:
> >
> > I am running here into a class cast exception when using
> -G:+TraceTruffleCompilationDetails:
> >
> > java.lang.ClassCastException:
> com.oracle.graal.truffle.nodes.frame.NewFrameNode cannot be cast to
> com.oracle.graal.nodes.ConstantNode
> >         at
> com.oracle.graal.truffle.PartialEvaluator.expandTree(PartialEvaluator.java:193)
> >
> > The corresponding line is:
> >  ConstantNode constantNode = (ConstantNode)
> methodCallTargetNode.arguments().first();
> >
> > However, the first argument is not a ConstantNode but a NewFrameNode
> (the new frame node looks like one of mine, i.e., for a TruffleSOM method
> call).
> >
> > The targetMethod of is
> `HotSpotMethod<FrameWithoutBoxing.getObject(FrameSlot)>`.
> >
> > The problem can be triggered for instance with the following TruffleSOM
> benchmark:
> >
> > ./mx.sh -d --vm server vm  -G:+TraceTruffleCompilationDetails
> -Xbootclasspath/a:../som/build/classes:../som/libs/com.oracle.truffle.api.jar:../som/libs/com.oracle.truffle.api.dsl.jar
> som.vm.Universe -cp ../som/Smalltalk
> ../som/Examples/Benchmarks/BenchmarkHarness.som Loop 1 100 100
> >
> > I suppose the receiver is here expected to be constant to print out
> tracing information, but it isn’t in my case.
> >
> > Is there perhaps some simple work-around possible?
> >
> > Thanks
> > Stefan
> >
> > To check out TruffleSOM:
> >
> > git clone --recursive https://github.com/smarr/TruffleSOM.git
> >   cd TruffleSOM
> >   ant jar
> >   cd $GRAAL
> >
> > --
> > Stefan Marr
> > Software Languages Lab
> > Vrije Universiteit Brussel
> > Pleinlaan 2 / B-1050 Brussels / Belgium
> > http://soft.vub.ac.be/~smarr
> > Phone: +32 2 629 2974
> > Fax:   +32 2 629 3525
> >
> >
>
> --
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 2974
> Fax:   +32 2 629 3525
>
>


More information about the graal-dev mailing list