-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Refactor Jfr into core and hosted #3746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The basic change looks good but you also need to change the |
| "workingSets": "SVM", | ||
| }, | ||
|
|
||
| "com.oracle.svm.core.jfr": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be an entry for com.oracle.svm.hosted.jfr as well? (maybe similar to the entry for com.oracle.svm.hosted.jdk11`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure here. Adding com.oracle.svm.core.jfr entry here, because it has extra dependencies, etc.
I believe that com.oracle.svm.hosted.jfr is different from com.oracle.svm.hosted.jdk11. com.oracle.svm.hosted.jdk11 has its own directory. Also, I don't see entries for sub-packages of com.oracle.svm.hosted, e.g. com.oracle.svm.hosted.jdk, etc.
Honestly, I don't quite understand how suite.py works. I would appreciate if you can point me any doc/wiki, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation is located at https://github.com/graalvm/mx
You need to do the following steps:
- Add a project
com.oracle.svm.core.jfr(analogue tocom.oracle.svm.jfr) but with only one dependency oncom.oracle.svm.core - Add a project
com.oracle.svm.hosted.jfr(analogue tocom.oracle.svm.jfr) but with only one dependency oncom.oracle.svm.hosted - Add
com.oracle.svm.core.jfras a dependency tocom.oracle.svm.core.genscavenge - Add the projects that you added to the distribution
SVM - Remove the project
com.oracle.svm.jfr - Do
mx cleanandmx ideclean - Test everything with
mx buildandmx ideinit. It should still be possible to build everything withmx buildand the IDE should be happy as well (once you import the new project files generated bymx ideinit).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christianhaeubl Thanks for the instructions.
Now, I am running into Java compliance issue, as com.oracle.svm.core.genscavenge has dependence on com.oracle.svm.core.jfr with higher Java compliance.
Should I move com.oracle.svm.core.jfr under com.oracle.svm.core.jdk11 and create an interface, e.g. JfrSupport to workaround jdk8?
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, then the only option is to create a proper dummy implementation for JDK8. We would need at least 4 JFR projects then:
com.oracle.svm.core.jfr(common infrastructure and interfaces)com.oracle.svm.core.jfr.jdk8(a dummy implementation that always acts as if JFR support is disabled)com.oracle.svm.core.jfr.jdk11(the current implementation fromcom.oracle.svm.jfr)com.oracle.svm.hosted.jfr(assuming that there is nothing JDK-specific in those classes)
com.oracle.svm.core.genscavenge would then only have a dependency on the JDK-independent part, i.e., com.oracle.svm.core.jfr.
| "com.oracle.svm.core.genscavenge", | ||
| "com.oracle.svm.core.containers", | ||
| "com.oracle.svm.jni", | ||
| "com.oracle.svm.jfr", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here, should there be two additional entries for core.jfr and hosted.jfr?
|
Close in favor of PR#3770 |
JFR functionality should be available in core for implementing VM specific events, such as GC events (see #3743 for details).
This patch splits current com.oracle.svm.jfr into com.oracle.svm.core.jfr and com.oracle.svm.hosted.jfr as @christianwimmer suggested.