jdk
jdk copied to clipboard
8307818: Convert Indify tool to Classfile API
An indify tool in j.l.i tests (also in vmTestBase) convert some source-code private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, MethodType, and CallSite constants. It currently uses ad-hoc code to process class files and intends to migrate to ASM; but since we have the Classfile API, we can migrate to Classfile API instead.
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8307818: Convert Indify tool to Classfile API (Sub-task - P4)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18841/head:pull/18841
$ git checkout pull/18841
Update a local copy of the PR:
$ git checkout pull/18841
$ git pull https://git.openjdk.org/jdk.git pull/18841/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18841
View PR using the GUI difftool:
$ git pr show -t 18841
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18841.diff
:wave: Welcome back OssamaLouati! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.
@OssamaLouati The following label will be automatically applied to this pull request:
core-libs
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.
This is going to be a difficult task because of the sheer size of indify tool; to migrate you really need in-depth understanding of both indify and CF API. Good luck!
Thank you
Webrevs
- 16: Full - Incremental (8cedaeaf)
- 15: Full - Incremental (02347415)
- 14: Full - Incremental (c5a08302)
- 13: Full - Incremental (03ec3ed6)
- 12: Full - Incremental (f80fd483)
- 11: Full - Incremental (7e928ced)
- 10: Full - Incremental (f869cce8)
- 09: Full - Incremental (0cac912d)
- 08: Full - Incremental (2b8c94a7)
- 07: Full - Incremental (781c951d)
- 06: Full - Incremental (91dbb74c)
- 05: Full - Incremental (3f41a98f)
- 04: Full - Incremental (f6c5bf0f)
- 03: Full - Incremental (992c9773)
- 02: Full - Incremental (040e925b)
- 01: Full - Incremental (96e6920a)
- 00: Full (0763be4d)
Minimal change to enable preview for build and run of the Indify tool is drafted here: https://github.com/openjdk/jdk/commit/7c2344b275da1dff99ade284192488eaa8ffba02
Indify invocation on Microbenchmarks as a part of the JDK build (after application of the above patch) still fails with:
Failure on /Applications/XcodeJIB.app/dev/github/jdk/build/macosx-aarch64/support/test/micro/classes
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.classfile.ClassModel.thisClass()" because "model" is null
at java.base/java.lang.classfile.ClassFile.transform(ClassFile.java:445)
at indify.Indify.transformToBytes(Indify.java:369)
at indify.Indify.writeNewClassFile(Indify.java:360)
at indify.Indify.indifyFile(Indify.java:356)
at indify.Indify.indifyTree(Indify.java:391)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indify(Indify.java:339)
at indify.Indify.run(Indify.java:191)
at indify.Indify.main(Indify.java:101)
Indify invocation on Microbenchmarks as a part of the JDK build (after application of the above patch) still fails with:
Failure on /Applications/XcodeJIB.app/dev/github/jdk/build/macosx-aarch64/support/test/micro/classes Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.classfile.ClassModel.thisClass()" because "model" is null at java.base/java.lang.classfile.ClassFile.transform(ClassFile.java:445) at indify.Indify.transformToBytes(Indify.java:369) at indify.Indify.writeNewClassFile(Indify.java:360) at indify.Indify.indifyFile(Indify.java:356) at indify.Indify.indifyTree(Indify.java:391) at indify.Indify.indifyTree(Indify.java:393) at indify.Indify.indifyTree(Indify.java:393) at indify.Indify.indifyTree(Indify.java:393) at indify.Indify.indifyTree(Indify.java:393) at indify.Indify.indifyTree(Indify.java:393) at indify.Indify.indifyTree(Indify.java:393) at indify.Indify.indify(Indify.java:339) at indify.Indify.run(Indify.java:191) at indify.Indify.main(Indify.java:101)
I applied a patch addressing this issue, the tool invocation should pass now on Microbenchmarks.
@OssamaLouati This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@OssamaLouati This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.