On Wed, 17 Jul 2024 04:52:35 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Citing David Holmes from bug report:
>> "We provided the ability to leave out certain VM services (JVMTI, GC's other 
>> than serial, ...) as part of the design of the MinimalVM to support Java SE 
>> Embedded, along with the Compact Profiles of JDK 8. This manifested in the 
>> source code as a set of INCLUDE_XXX ifdef guards. The build system later 
>> exposed these as individual --with-jvm-features=xxx,yyy support. However, it 
>> was never intended (and certainly not tested) that you could mix-and-match 
>> arbitrary subsets of these VM features at will. Consequently if you start 
>> trying to do this you will find things that need fixing."
>> 
>> I added `INCLUDE_JVMTI` guards in two places where it was missed: JVMCI and 
>> JFR.  Affected code was added recently, in the past year. After that I was 
>> able to build VM on all supported platforms.
>> 
>> Note: building VM without JVMTI is not officially supported feature. We are 
>> not testing it and such failures (missing guards) are not unexpected.
>> 
>> A lot of tests failed with VM without JVMTI. All are expected failures. I 
>> listed failed tests in bug report.
>> I fixed (added requires `vm.jvmti`) only one which was part of 
>> [JDK-8257967](https://bugs.openjdk.org/browse/JDK-8257967) changes which 
>> introduced JFR code without `INCLUDE_JVMTI` guards.
>> 
>> I ran 2 rounds of testing:
>> 
>> First, only **tier1** with VM built without JVMTI to see if builds passed 
>> and which tests affected. I wrote comment in bug report which tests failed 
>> (all expected to fail without JVMTI).
>> 
>> Second round of testing with JVMTI in VM: tier1-4
>
> src/hotspot/share/jfr/instrumentation/jfrJvmtiAgent.hpp line 35:
> 
>> 33:   JfrJvmtiAgent();
>> 34:   ~JfrJvmtiAgent();
>> 35:   static bool create() NOT_JVMTI_RETURN_(true);
> 
> It initially seemed odd to return `true` here, but looking through the JFR 
> code that interacts with the Agent it seems the right way to view this is 
> that without JVMTI we have a no-op agent.

Right.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20209#discussion_r1680433885

Reply via email to