Initial PR for JFR susbsystem initialization#23602
Initial PR for JFR susbsystem initialization#23602gacholio merged 1 commit intoeclipse-openj9:masterfrom
Conversation
029f0e3 to
d24170d
Compare
| if (NULL != unnamedModuleForSystemLoader) { | ||
| j9object_t module = unnamedModuleForSystemLoader->moduleObject; | ||
| if (NULL != module) { | ||
| moduleObject = javaVM->internalVMFunctions->j9jni_createLocalRef(env, module); |
There was a problem hiding this comment.
This call can not fail (it aborts the VM on OOM). It returns NULL only for NULL input, so you could technically also remove the above NULL check.
| } | ||
|
|
||
| vmFuncs->internalEnterVMFromJNI(currentThread); | ||
| vm->jfrState.jfrInternalEventClass = vmFuncs->internalFindClassUTF8(currentThread, (U_8 *)J9UTF8_DATA(&jfrInternalEventClassUTF8), J9UTF8_LENGTH(&jfrInternalEventClassUTF8), vm->systemClassLoader, 0); |
There was a problem hiding this comment.
Storing J9Class pointers is problematic for HCR unless you intend to update them. Usually we use a global ref which is updated already.
f29863d to
07e0036
Compare
|
@gacholio changes ready for another look |
|
jenkins compile win jdk17 |
|
jenkins test sanity.functional alinux64 jdk21 |
|
The global refs should be freed during shutdown (and arguably during failed startup, i.e. one ref create, one fails). |
|
jenkins test sanity.functional alinux64 jdk25 |
|
jenkins compile win jdk11 |
|
jenkins test saniity amac jdk17 |
2201484 to
41352e2
Compare
|
jenkins test sanity.functional alinux64 jdk25 |
|
jenkins test sanity.functional amac jdk11 |
5ab26b1 to
c0b92a3
Compare
There is an entire subsystem in the JDK responsible for profiling and recording events. A large portion of JFR functionality lives in the jfr.jdk module. There are many steps to get the JFR subsystem up and PR provides some initialization code for the JFR subsystem. Further support will need to be added to fully bringup the JFR subsystem. Currently JFR support is limited to the VM so J9 only emits VM events and does not support any capailities that are available in the JCL. This PR recognizes the `-XX:StartOpenJ9ExperimentalFlightRecording` option which differentiates it from the existing `-XX:StartFlightRecording` (VM events only) option. The experimental flag will be used to enable the JFR subsystem wfor testing purposes development continues to fully bringup the JFR subsystem. Eventually, the experimental flag will be removed and the JFR subsystem will be enabled by `-XX:StartFlightRecording` flags. This PR adds support to initiate initialization of the JFR subsystem cmdline arguments. It also provides some basic support to progress past the stages of JFR initialization. Signed-off-by: Tobi Ajila <atobia@ca.ibm.com>
|
jenkins test sanity.functional alinux64 jdk25 |
|
jenkins test sanity.functional amac jdk11 |
|
@gacholio This is ready for another look |
|
@gacholio can this be merged? |
|
Sorry, didn't notice it was out of draft state. |
…fr6"" This reverts commit 85cace1.
There is an entire subsystem in the JDK responsible for profiling and recording events. A large portion of JFR functionality lives in the jfr.jdk module. There are many steps to get the JFR subsystem up and PR provides some initialization code for the JFR subsystem. Further support will need to be added to fully bringup the JFR subsystem.
Currently JFR support is limited to the VM so J9 only emits VM events and does not support any capailities that are available in the JCL.
This PR recognizes the
-XX:StartOpenJ9ExperimentalFlightRecordingoption which differentiates it from the existing-XX:StartFlightRecording(VM events only) option. The experimental flag will be used to enable the JFR subsystem wfor testing purposes development continues to fully bringup the JFR subsystem. Eventually, the experimental flag will be removed and the JFR subsystem will be enabled by-XX:StartFlightRecordingflags.This PR adds support to initiate initialization of the JFR subsystem cmdline arguments. It also provides some basic support to progress past the stages of JFR initialization.