RFR [jcov, unfilled]: jcov does not instrument files with NestHost/NestMembers attributes
Leonid Kuskov
Leonid.Kuskov at Oracle.com
Tue Aug 7 17:42:26 UTC 2018
Hi Jan,
These fixes look good. We already use the same approach in private jcov
build for instrumenting JDK 12.
Please apply the patch further I will add couple cosmetic fixes that I
have for JDK 12 classfiles.
Thanks,
Leonid
On 8/7/18 08:37, Jonathan Gibbons wrote:
> Ooops, wrong list (asmtools-dev)
>
> cc: jcov-dev
>
> -- Jon
>
> On 8/7/18 8:25 AM, Jan Lahoda wrote:
>> Hi,
>>
>> It seems that jcov cannot instrument files with NestHost/NestMembers
>> attributes (JDK 11 classfiles), and silently uses the original
>> version. The reason appears to be that even though it uses ASM 6.2,
>> which knows about those attributes, the visitors are using "ASM6"
>> compatibility flag, which does not support these attributes.
>>
>> My proposal here is to upgrade the compatibility flag to
>> "ASM7_EXPERIMENTAL" compatibility level. It might be better to define
>> a constant for the compatibility level constant, so that on next
>> upgrade, we don't need to modify so many files. The proposed patch is
>> here:
>> http://cr.openjdk.java.net/~jlahoda/jcov-nesthost/webrev.allow.nesthost.00/
>>
>>
>> Also, we could enhance the build script to allow running tests:
>> http://cr.openjdk.java.net/~jlahoda/jcov-nesthost/webrev.test.00/
>>
>> If these would seem to go in a reasonable direction, I'll file bugs.
>> It may be necessary to do a few more changes to support JDK 12
>> classfiles.
>>
>> Any feedback is welcome!
>>
>> Thanks,
>> Jan
>
More information about the code-tools-dev
mailing list