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

Erik Gahlin egahlin at openjdk.java.net
Sat Jan 8 10:13:53 UTC 2022


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

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

Commit messages:
 - Initial

Changes: https://git.openjdk.java.net/jdk/pull/6998/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6998&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279646
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6998.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6998/head:pull/6998

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


More information about the hotspot-jfr-dev mailing list