Truffle multithreaded language
Timothy Baldridge
tbaldridge at gmail.com
Thu Oct 3 15:38:54 PDT 2013
In my continued investigations of Truffle I decided to see what happened
when I threw multiple threads at my AST.
What I have is a simple BF language with no specialization (we pass around
Objects and cast to ints/bytes as needed).
For this test, I parse the source code once, and then have 3 threads
execute the code over and over again. However when truffle kicks in (after
1000 total invocations of the function), I get the following error:
[thread:8] scope:
[thread:8] scope: Truffle
[thread:8] scope: Truffle.createGraph
[thread:8] scope: Truffle.createGraph.InterceptException
Exception occurred in scope: Truffle.createGraph.InterceptException
Context obj java.lang.IllegalStateException: Inlined graph is in
invalid state
Context obj
StructuredGraph:4{HotSpotMethod<OptimizedCallTarget.executeHelper(PackedFrame,
Arguments)>}
Use -G:+DumpOnError to enable dumping of graphs on this error
Context obj DebugDumpScope[Truffle: MainNode at 333bee49]
[truffle] opt failed MainNode at 333bee49
java.lang.IllegalStateException: Inlined graph is in invalid state
java.lang.IllegalStateException: Inlined graph is in invalid state
I create a CallTarget per thread, but I do share the AST between all
threads.
How is this supposed to work in a large language? Am I expected to
duplicate the AST for every thread? And if so, how would I get something
like that to work with thread pools.
Thanks for the help,
Timothy Baldridge
More information about the graal-dev
mailing list