RFR: 8292177: InitialSecurityProperty JFR event [v2]

Erik Gahlin egahlin at openjdk.org
Thu Sep 29 11:43:11 UTC 2022


On Thu, 29 Sep 2022 10:02:05 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

>> How does it capture the event if JFR was started before the security properties were read? I would think you still need some additional code in Security.java to record the properties if the event is enabled.
>
> As per yesterday's stack trace, JFR triggers loading of the Security class - so your scenario won't arise with current state. We could include the new Event with period of `endChunk `instead of `beingChunk `setting. That should ensure the properties are only captured when the JFR recording is exiting. 
> @egahlin - would you have a preference on this ?

With event streaming, beginChunk is usually to prefer. Otherwise, a client that monitors the JVM must wait until the first chunk rotation to get the data.

That said, we want startup to be quick. There should probably be a common parameter, i.e. security=off/normal/audit/trace, that handles enablement for all security events. I don't know how expensive this event is and where it would fit among those categories?

If the event triggers class loading, it might make sense to check if the event is enabled first.

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

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



More information about the security-dev mailing list