Home > Technology, java, programming > Emma Code Coverage Tool Fixed 64 Bit Support (2.1.5320)

Emma Code Coverage Tool Fixed 64 Bit Support (2.1.5320)

July 27th, 2009

So I’ve been spending my time trying to come up with a fix for 64bit JVM support in EMMA for some tools I’ve been building.  Unforunately active development on EMMA has died, and although there have been talks about forking the project nothing has really happened with this project since 2005.  EMMA 2.1 is really neat because it comes with some tools that allow you to do instrumentation on the fly, while applications remain running.

This can allow you to do coverage of your apps against live automation tests instead of just JUnit test cases.  If you’ve ever tried to run EMMA in a 64bit JVM you’ll know that you get a wonderful ArrayIndexOutOfBounds Exception the second you try to instrument the code.  This issue is known and there is a bug filled in the bug tracker for EMMA but since no one is actively maintaining it nothing has really been done to fix it.

If you checkout the bug tracker (here) a nice fellow by the name of Lukas has generated a patch to fix this issue, and even provided a patched version of emma.jar on his blog.  Unfortunately this patch and the patched emma.jar are for 2.0.5312 which does not have support for the CTL tool.  This is the tool that allows you to do instrumentation on the fly without relying on a JVM shutdown to write coverage information.

With all this information in hand I decided that I would patch the latest 2.1.5320 codeline in order to bring 64bit support to the Emma 2.1 branch.  This was a little more difficult then I originally thought, but luckily I wound up getting everything working in the end.

I am providing here a copy of the patched emma.jar (version 2.1.5320 fixed) in hopes that it may help some people out and perhaps spur some people to fork EMMA and get development started again on this project.  I’d definitely be more than willing to help get something like that started.

Please see the EMMA license for distribution. Please note I do not plan to release newer versions of Emma.

Fixed version of Emma 2.1.5320: http://www.kungfuice.com/wp-content/uploads/2009/07/emma.jar

kungfuice Technology, java, programming ,

  1. No comments yet.
  1. No trackbacks yet.