RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v4]
Alan Bateman
alanb at openjdk.org
Mon Mar 13 15:07:22 UTC 2023
On Fri, 10 Mar 2023 12:45:05 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> jdk.jlink internal plugins are heavily using ASM
>>
>> This patch converts ASM calls to Classfile API.
>>
>> Please review.
>> Thanks,
>> Adam
>
> Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 208 commits:
>
> - Merge branch 'master' into JDK-8294972-jlink-plugins
>
> # Conflicts:
> # src/java.base/share/classes/module-info.java
> - Merge branch 'master' into JDK-8294972-jlink-plugins
> - fixed SystemModulesPlugin formatting
> - 8303624: The java.lang.Thread.FieldHolder can be null for JNI attaching threads
>
> Reviewed-by: alanb, dcubed
> - 8302360: Atomic*.compareAndExchange Javadoc unclear
>
> Reviewed-by: martin, dholmes
> - 8302779: HelidonAppTest.java fails with "assert(_cb == CodeCache::find_blob(pc())) failed: Must be the same" or SIGSEGV
>
> Reviewed-by: coleenp, sspitsyn
> - 8303691: Fedora based devkit build should load more packages from archive location
>
> Reviewed-by: mbaesken, erikj
> - 8303924: ProblemList serviceability/sa/UniqueVtableTest.java on Linux
>
> Reviewed-by: dcubed
> - 8303609: ProblemList serviceability/sa/TestSysProps.java with ZGC
>
> Reviewed-by: dcubed
> - 8289765: JDI EventSet/resume/resume008 failed with "ERROR: suspendCounts don't match for : VirtualThread-unparker"
>
> Reviewed-by: sspitsyn, kevinw
> - ... and 198 more: https://git.openjdk.org/jdk/compare/b1d89f30...cfc612ec
I've done a first pass over the SystemModulesPlugins. There are >1000 of changes to that plugin but it looks quite good.
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 75:
> 73: import jdk.internal.module.ModuleTarget;
> 74:
> 75: import jdk.internal.classfile.attribute.ModulePackagesAttribute;
I don't think this is directly used.
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 866:
> 864: }
> 865:
> 866: MethodTypeDesc desc = MethodTypeDesc.ofDescriptor("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map$Entry;");
It would be helpful if some of the overly long lines could be trimmed down a bit as it's really hard to look at changes side-by-side.
-------------
PR: https://git.openjdk.org/jdk/pull/12944
More information about the core-libs-dev
mailing list