Regression for TraceTruffleCompilationDetails?
Stefan Marr
java at stefan-marr.de
Mon Dec 16 05:57:32 PST 2013
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