[Rev 02] RFR: 6656: Allow capturing field values with path syntax
Kangcheng Xu
kxu at openjdk.java.net
Thu Dec 19 17:56:43 UTC 2019
On Thu, 19 Dec 2019 17:34:41 GMT, Kangcheng Xu <kxu at openjdk.org> wrote:
>> core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/Transformer.java line 69:
>>
>>> 68: registry.storeClassPreInstrumentation(className, classfileBuffer);
>>> 69: byte[] instrumentedClassfileBuffer = registry.isRevertIntrumentation() ?
>>> 70: registry.getClassPreInstrumentation(className) : classfileBuffer;
>>
>> This is not related to this change, but this looks funny to me - why are we storing the class pre-instrumentation? To return to the pre-instrumented version should just be to redefine the class (i.e. run all transformers) without applying any transform.
>
> Sorry, this is actually my bad. I thought the bytecode provided to the transformer would be the current running bytecode (ie. possibly after transformation), and I misled @jessyec-s when she was implementing [JMC-5458: Support Class-Redefinitions](https://bugs.openjdk.java.net/browse/JMC-5458).
[JMC-6658: Remove unnecessary storing of pre-instrumented bytecode](https://bugs.openjdk.java.net/browse/JMC-6658) is created for resolving this issue.
-------------
PR: https://git.openjdk.java.net/jmc/pull/20
More information about the jmc-dev
mailing list