Thursday, 10 October 2013

Improving Java debugger hotswap

These days, I have been fixing bugs in an application which runs onto an application server. I have found that these flags can improve the JVM HotSwap, basically, increasing the space where the classes are loaded with MaxPermSize and allowing the garbage collector to unload classes from this space, will improve the success rate doing hotswap. The third parameter is needed to activate this flag CMSClassUnloadingEnable.
-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC