+TraceTruffleCompilation: More detailed infos on optimization

Christian Humer christian.humer at gmail.com
Mon Sep 29 14:19:28 UTC 2014


Hi Gero,

a) the function which got called and


CallTarget#toString() delegates to RootNode#toString() which is controlled
by the guest language.  So feel free to implement your own overwritten
version of RootNode#toString() in R that fits your need to identify the
guest language function.

b) from where it got called,

Do you mean the call site that made the CallTarget hot? We could just go up
the guest language stack trace once to see where it got hot. How did you
implement that, and can you give me an example output with your
modifications?

Additionally every node can override Node#getDebugProperties() to provide
additional debug information. We could use the
 RootNode#getDebugProperties() method to provide additional information for
the output.  Can you elaborate which kind of information do you want to
provide this way and also how would you like to see this information get
integrated into the log output?

On the long term, i think we should work towards a web based logging tool
for Truffle. Console log outputs are very limited.

Thanks.

- Christian Humer

On Mon, Sep 29, 2014 at 3:51 PM, Gero Leinemann <gero.leinemann at oracle.com>
wrote:

> Hi all,
>
> when checking FastR programs with "+TraceTruffleCompilation" and looking
> at the output only it's currently impossible to 100% identify
> a) the function which got called and
> b) from where it got called,
> as "CallTarget.toString()" offers only limited information (and only about
> the callee).
>
> I locally added the parameter "SourceSection callSrc" from
> "OptimizedCallTarget.compile" all the way down to "OptimizedCallTargetLog.logOptimizingDone"
> which turned out to be tremendously helpful. This is of course very
> language specific, but I can imagine that others have the same problem, too.
>
> If yes, I'd suggest to find a generic solution for language implementors
> to add information to the output, even if it's only for debugging purposes.
> Would that make sense?
>
> Best,
> Gero
>


More information about the graal-dev mailing list