Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable JVM Hot Swap

Tags:

debugging

jvm

We are instrumenting byte code and we use Eclipse for software development.

We now have to following problem: when debugging, Eclipse is replacing our instrumented code with the compiled code using hot swap since it detects that it was changed.

In Eclipse I did not find any way to disable the feature: in the Hot Code Replace settings section I only see ways to enable/disable warnings.

As already answered we can disable auto build but I wanted to ask if there is a way (an option) to tell the JVM to disable the hot swap feature?

We could just start the JVM with the option disabled and we should not care about Eclipse or any other IDE/debugger swapping the code.

like image 318
Matteo Avatar asked Sep 23 '11 10:09

Matteo


1 Answers

I have looked and thought and looked again at your problem, as far as I can tell in hotspot at the VM level there is no easy way to disable this feature.

It looks like the hotswap code is deep within the JVMTI (JVM tool interface), and if I read the code right can only really be controlled if you are embedding the JVM.

It just looks like its not going to be possible without patch the JVM

like image 185
Greg Bowyer Avatar answered Oct 05 '22 03:10

Greg Bowyer