First, the first point is that in the evolution process of the Instrumentation class, redefine came first, followed by retransform, which is actually an improvement on redefine.
Then, the scope of influence for redefine and retransform differs: transformer
The redefine operation will trigger:
retransformation incapable transformer
retransformation capable transformer
The retransform operation will trigger:
retransformation capable transformer Of course, since canRetransform is generally true nowadays, their functionalities are almost identical. However, when canRetransform is false, there will be differences in behavior between the two.