Has --dump-debug-dir behaviour changed in JDK9?
sundararajan.athijegannathan at oracle.com
Wed Jun 10 04:22:47 UTC 2015
Filed a bug to track for future reference:
Actually, this is not a bug. Two things:
1) --compile-only / -co option is no longer mandatory to use
2) optimistic types is off by default in jdk8u and it is on by default
With optimistic types, code generation is lazier & optimistic -- code is
generated/re-generated as you run the code. With jdk9, you can either
1) Turn off optimistic types with jdk9 (using -ot=false option) and dump
similar code as in jdk8u
2) or run the code (i.e., remove -co / --compile-only option) and get
all generated (and regenerated) code dumped.
PS. I've resolved the bug as "not an issue".
Hope this explains,
On Wednesday 10 June 2015 02:55 AM, Chris Newland wrote:
> Has Nashorn's behaviour for dumping bytecode changed in JDK9?
> Executed using
> $JAVA_HOME/bin/jjs -co --dump-debug-dir=. run.js
> Under 8u60b18 the bytecode is produced as expected:
> This visualises correctly in JITWatch and the bytecode maps back to the
> source as expected.
> But under 9b67 only a small amount of bytecode is output that doesn't
> represent the source program:
> The correct program output is produced under both executions so I don't
> think the difference is down to dead code elimination.
> Possible regression?
>  https://github.com/AdoptOpenJDK/jitwatch
More information about the nashorn-dev