Integrated: 8279646: JFR: Remove recursive call in jdk.jfr.internal.Control

Erik Gahlin egahlin at openjdk.java.net
Tue Jan 11 02:55:29 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

This pull request has now been integrated.

Changeset: 2f13872d
Author:    Erik Gahlin <egahlin at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/2f13872d5152a7fab122d52ebcfb468dc0db7ac5
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8279646: JFR: Remove recursive call in jdk.jfr.internal.Control

Reviewed-by: mgronlun

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

PR: https://git.openjdk.java.net/jdk/pull/6998


More information about the hotspot-jfr-dev mailing list