RFR: 8279646: JFR: Remove recursive call in jdk.jfr.internal.Control
Markus Grönlund
mgronlun at openjdk.java.net
Mon Jan 10 14:45:30 UTC 2022
On Sat, 8 Jan 2022 03:58:00 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
> Hi,
>
> Could I have a review of a fix that removes an endless recursive call.
>
> The reason this has gone unnoticed is because the Control::getValue() method is never invoked for VM events.
>
> The getValue() method is invoked when a new SettingControl is instantiated for a user-defined event, see line 177 in EventControl.java, which never happens for native events. The method is also invoked when fetching the default value, see line 69 in Control.java, but native events provides them directly, when instantiated, for example in EventControl::defineThreshold, so the bug has never been exposed.
>
> That said, getValue() should delegate like the other methods, i.e combine(Set) and setValue(String), in the Control class.
>
>
> Testing: jdk/jdk/jfr
>
> Thanks
> Erik
Marked as reviewed by mgronlun (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/6998
More information about the hotspot-jfr-dev
mailing list