Why the extra stack frames with Clojure 1.8.0-RC2 vs 1.7.0?

167 views
Skip to first unread message

Andy Fingerhut

unread,
Nov 16, 2015, 2:27:49 PM11/16/15
to cloju...@googlegroups.com
This might all be perfectly normal, but I couldn't easily see the cause of the change.  Just noticed it when diff'ing some stack traces thrown by Eastwood that are otherwise similar between Clojure 1.7.0 and 1.8.0-RC2.

Andy

Andy Fingerhut

unread,
Nov 23, 2015, 8:49:43 AM11/23/15
to cloju...@googlegroups.com
I've determined that the extra stack frames were definitely introduced between Clojure 1.8.0-alpha2 and 1.8.0-alpha3, when direct linking was introduced.

Does anyone know if the extra stack frames in the stack traces represent additional method calls being made at run time?

If so, does that hurt or offset the speed gains desired from direct linking?

Andy

Nicola Mometto

unread,
Nov 23, 2015, 8:54:32 AM11/23/15
to cloju...@googlegroups.com

Andy, with 1.8, whenever a function can be direct linked, it's class representation will be something like this:

public class .. implements IFn {
..
public static Object invokeStatic() {
<CODE HERE>
}
public Object invoke() {
return invokeStatic();
}
..
}

while in 1.7, without invokeStatic, the bytecode would be directly in invoke().

I don't think this will have any impact since this 1 method indirection has been there for invokePrim aswell

Nicola
> --
> You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.
> To post to this group, send email to cloju...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojure-dev.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages