Planet JDKNews and views from the Java SE Development-Kit CommunityVariousAndrew Hughes: [SECURITY] IcedTea 1.13.8 for OpenJDK 6 Released!Andrew Hugheshttp://blog.fuseyism.com/?p=8392015-07-30T21:52:40Z2015-07-30T20:31:11Z
The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as a PulseAudio sound driver, the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK. This release updates our OpenJDK 6 support […]
0gnu_andrew2015-07-30T20:31:11Z
Andreas Sterbenz: Modifying the run configuration for the JUnit test runnerAndreas Sterbenzhttps://blogs.oracle.com/andreas/entry/modifying_the_run_configuration_for2015-07-28T05:48:14Z2015-07-28T05:40:13Z

Sometimes it is necessary to set specific java properties or to add specific virtual machine options when unit tests are executed with JDeveloper's JUnit test runner. However, there is no separate option to modify the runtime environment for the test runner - it simply takes the active run configuration which is selected in the "Run/Choose Active Run Configuration" menu (which is by the way the ...

Andreas Fester-Oracle 2015-07-28T05:40:13Z
Andrew Hughes: [SECURITY] IcedTea 2.5.6 for OpenJDK 7 Released!Andrew Hugheshttp://blog.fuseyism.com/?p=8342015-07-23T02:08:55Z2015-07-23T02:08:45Z
The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK. This release updates our OpenJDK 7 support in the 2.5.x series […]
0gnu_andrew2015-07-23T02:08:45Z
Andrew Hughes: [SECURITY] IcedTea 2.6.1 for OpenJDK 7 Released!Andrew Hugheshttp://blog.fuseyism.com/?p=8292015-07-21T19:27:27Z2015-07-21T19:27:27Z
The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK. This release updates our OpenJDK 7 support in the 2.6.x series […]
1gnu_andrew2015-07-21T19:27:27Z
Andrew Hughes: IcedTea 2.6.0 for OpenJDK 7 ReleasedAndrew Hugheshttp://blog.fuseyism.com/?p=8142015-07-20T14:28:44Z2015-07-19T17:02:39Z
We are pleased to announce the release of IcedTea 2.6.0. The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK. This […]
0gnu_andrew2015-07-19T17:02:39Z
Jeroen Frijters: New Development SnapshotJeroen Frijtershttp://weblog.ikvm.net/PermaLink.aspx?guid=8229e778-da90-4881-95b6-8f5ede1c1ed22015-07-07T07:14:15Z2015-07-07T07:14:15Z

Final 8.1 development snapshot. Release candidate 0 will be next (after .NET 4.6 RTM).

http://weblog.ikvm.net/Trackback.aspx?guid=8229e778-da90-4881-95b6-8f5ede1c1ed2http://weblog.ikvm.net/pingback.aspxhttp://weblog.ikvm.net/PermaLink.aspx?guid=8229e778-da90-4881-95b6-8f5ede1c1ed2http://weblog.ikvm.net/CommentView.aspx?guid=8229e778-da90-4881-95b6-8f5ede1c1ed2http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8229e778-da90-4881-95b6-8f5ede1c1ed2

Final 8.1 development snapshot. Release candidate 0 will be next (after .NET 4.6 RTM).

Changes:

Binaries available here: ikvmbin-8.1.5666.zip

Jeroen2015-07-07T07:14:15Z
Jeroen Frijters: MethodHandle PerformanceJeroen Frijtershttp://weblog.ikvm.net/PermaLink.aspx?guid=35b39430-63e7-4807-a510-65ae70a8f5862015-06-25T06:59:31Z2015-06-25T06:59:31Z

Last time I mentioned that with the integration of OpenJDK 8u45 MethodHandle performance went from awful to unusable. That was pretty literal as the JSR 292 test cases that I regularly run went from taking about 8 minutes to more than 30 minutes (when my patience ran out).

http://weblog.ikvm.net/Trackback.aspx?guid=35b39430-63e7-4807-a510-65ae70a8f586http://weblog.ikvm.net/pingback.aspxhttp://weblog.ikvm.net/PermaLink.aspx?guid=35b39430-63e7-4807-a510-65ae70a8f586http://weblog.ikvm.net/CommentView.aspx?guid=35b39430-63e7-4807-a510-65ae70a8f586http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=35b39430-63e7-4807-a510-65ae70a8f586

Last time I mentioned that with the integration of OpenJDK 8u45 MethodHandle performance went from awful to unusable. That was pretty literal as the JSR 292 test cases that I regularly run went from taking about 8 minutes to more than 30 minutes (when my patience ran out).

Using sophisticated profiling techniques (pressing Ctrl-Break a few times) I determined that a big part of the problem was MethodHandle.asType(). So I wrote a microbenchmark:

   IKVM 8.0.5449.1  IKVM 8.1.5638
asType.permutations(1) 2108 9039
asType.permutations(2) 2476 17269

The numbers are times in milliseconds. Clearly not a good trend. I did not investigate deeply what changed in OpenJDK, but after looking at the 8u45 code it was clear that too many intermediate MethodHandles were being created. So I rewrote asType to create a single LambdaForm to do all the work at once. This improved the performance a bit, but the disturbing increase in time for the second iteration was still there. Once again I decided not to investigate the root cause of this, but simply to assume that it was because of anonymous type creation (the CLR has no anonymous types and creating a type is relatively expensive).

Avoiding anonymous type creation turned out to be easy (well, the high level design was easy, the actual implementation took a lot more time). I just had to replace the LambdaForm compiler. There is a single method that represents the exact point where I can come in and change the implementation:

static MemberName generateCustomizedCode(LambdaForm form, MethodType invokerType) { ... }

In OpenJDK this method compiles the LambdaForm into a static method in an anonymous class and returns a MemberName that points to the static method. All I had to do was replace this method with my own implementation that directly generates a .NET DynamicMethod. As I said before, the idea was simple, actually getting the implementation correct took a couple of weeks (part time).

With both these optimizations in place, MethodHandle performance is back to awful (actually, it is less afwul than it was before):

   IKVM 8.0.5449.1  IKVM 8.1.5638  IKVM 8.1.5653
asType.permutations(1) 2108 9039 314
asType.permutations(2) 2476 17269 210

The running time of the JSR 292 test cases went down to less than 7 minutes. So I was satisfied. There are many more opportunities to improve the MethodHandle performance on IKVM, but so far no IKVM user has complained about it, so it is not a priority. Note that Java 8 lambdas are not implemented using MethodHandles on IKVM.

Changes:

Binaries available here: ikvmbin-8.1.5653.zip

Jeroen2015-06-25T06:59:31Z
David Dice: Accelerating Native Calls using Transactional MemoryDavid Dicehttps://blogs.oracle.com/dave/entry/accelerating_native_calls_using_transactional2015-06-17T19:09:07Z2015-06-17T19:09:07Z

Accelerating Native Calls using Transactional Memory appears in WTTM 2015.

Dave 2015-06-17T19:09:07Z
David Dice: Refined Transactional Lock ElisionDavid Dicehttps://blogs.oracle.com/dave/entry/refined_transactional_lock_elision2015-06-11T16:03:49Z2015-06-11T16:03:49Z

Refined Transactional Lock Elision appears in Transact 2015.

Dave 2015-06-11T16:03:49Z
David Gilbert: JFreeSVG 3.0David Gilberthttp://www.jroller.com/dgilbert/entry/jfreesvg_3_02015-06-09T16:43:05Z2015-06-09T16:43:05Z

I'm happy to announce that JFreeSVG version 3.0 has been uploaded to SourceForge. JFreeSVG is a fast and lightweight API for creating SVG content in Java. This release features:

David Gilbert2015-06-09T16:43:05Z
Jeroen Frijters: New Development SnapshotJeroen Frijtershttp://weblog.ikvm.net/PermaLink.aspx?guid=852ff0da-f4da-44b6-8d25-5261ca4139862015-06-09T11:50:20Z2015-06-09T11:50:20Z

I integrated OpenJDK 8u45, so a new development snapshot is warranted. MethodHandle performance regressed from awful to unusable, so that's something I need to look into.

http://weblog.ikvm.net/Trackback.aspx?guid=852ff0da-f4da-44b6-8d25-5261ca413986http://weblog.ikvm.net/pingback.aspxhttp://weblog.ikvm.net/PermaLink.aspx?guid=852ff0da-f4da-44b6-8d25-5261ca413986http://weblog.ikvm.net/CommentView.aspx?guid=852ff0da-f4da-44b6-8d25-5261ca413986http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=852ff0da-f4da-44b6-8d25-5261ca413986Jeroen2015-06-09T11:50:20Z