RFR: 8257967: JFR: Events for loaded agents [v4]

Markus Grönlund mgronlun at openjdk.org
Thu Mar 9 09:24:16 UTC 2023


On Wed, 8 Mar 2023 23:28:52 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> Markus Grönlund has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - remove JVMPI
>>  - cleanup
>
> No need to load any JFR classes. No change to startup logic.

> @mgronlun Why mark Java agents as command-line or dynamic using `initializationMethod = "premain"/"agentMain"` and mark native agents using `dynamic = true/false`? Why not use `dynamic` for both?

Hi Andrew, that's a good question. I thought it could be derived in the JavaAgent case, because there are only two entry points, "premain" implies static and "agentmain" implies dynamic.

For the native case, there is no information about the callback (I had it, but it depends on symbols), so the dynamic field is made explicit.

It can also be added to the JavaAgent if that makes it clearer.

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

PR: https://git.openjdk.org/jdk/pull/12923


More information about the serviceability-dev mailing list