8233197(S): Invert JvmtiExport::post_vm_initialized() and Jfr:on_vm_start() start-up order for correct option parsing

Markus Gronlund markus.gronlund at oracle.com
Tue Nov 19 14:38:26 UTC 2019


Greetings,

(apologies for the wide distribution)

Kindly asking for reviews for the following changeset:

Bug: https://bugs.openjdk.java.net/browse/JDK-8233197 
Webrev: http://cr.openjdk.java.net/~mgronlun/8233197/webrev01/
Testing: serviceability/jvmti, jdk_jfr, tier1-5
Summary: please see bug for description.

For Runtime / Serviceability folks:
This change slightly modifies the relative order in Threads::create_vm(); please see threads.cpp.
There is an upcall as part of Jfr::on_vm_start() that delivers global JFR command-line options to Java (only if set).
The behavioral change amounts to a few classes loaded as part of establishing this upcall (all internal JFR classes and/or java.base classes, loaded by the bootloader) no longer being visible to the ClassFileLoadHook's of agents. These classes are visible to agents that work with "early_start" JVMTI environments however.

The major part of JFR startup with associated class loading still happens as part of Jfr::on_vm_live() with no behavioral change in relation to agents.

Thank you
Markus


More information about the serviceability-dev mailing list