Explosions in calls to MutableCallSite.setTarget
sundararajan.athijegannathan at oracle.com
Fri Sep 6 20:52:33 PDT 2013
Thanks for writing to us. Yes - Nashorn jdk7 is more of what we'd say
There have been changes in jsr292/jdk as well as in nashorn with the
latest jdk8 codebase. Please use nashorn in jdk8 pre-release snapshots.
If the issue you are seeing is reproduced with jdk8, please file a bug
or send us the details (in this list) and we'll file a bug.
On Friday 06 September 2013 07:14 PM, Benjamin Sieffert wrote:
> Hi everyone,
> we're still eager users of nashorn around here and while doing some
> profiling stumpled upon a kind of weird behaviour, where there are periods
> almost our complete CPU is consumed by calls to setTarget / setTargetNormal
> on java.lang.invoke.Callsite.
> What we do in our code is to initialize a few hundred script engines and
> returned js-object and call a certain method on it in massive scale. There
> As we initialize the script engines, there is of course a noticable surge
> down within a few minutes and we see a very good performance, until
> suddenly our threads start to get very very busy with the already mentioned
> calls so setTarget(). This will die down after a while, too, but happen
> again after seemingly random periods.
> Looking at the exact stack trace, it's:
> at java.lang.invoke.MethodHandleNatives.setCallSiteTargetNormal(Native
> I have to admit that we are still using the jdk7-backport, though, which
> has not been updated since July. Possibly this is a problem already fixed
> in the jdk8 branch. If so, keep up the good work! :) If not, I'd gladly
> take any input on what might cause this problem and what we might do to
> counteract it.
> Best regards
More information about the nashorn-dev