JDK-8147010 : Update JavaFX for move of sun.misc.PerformanceLogger to sun.awt.util
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-01-13
  • Updated: 2016-02-16
  • Resolved: 2016-01-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
Description
We need to update com.sun.javafx.tk.quantum.PerformanceTrackerHelper in JavaFX to account for the move of sun.misc.PerformanceLogger to sun.awt.util in JDK-8146735.

We access this class via reflection, so it will be easy to look for it either in its new location or its old location (so we can still run tests with JDK 8u60).

Comments
Changeset: 7cae930f7a19 Author: ckyang Date: 2016-01-29 17:40 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/7cae930f7a19
30-01-2016

+1
29-01-2016

Please review the proposed fix: http://cr.openjdk.java.net/~ckyang/JDK-8147010/webrev.00/
27-01-2016

@Mandy: I haven't looked at the class to know whether it would be easier to copy it. Given that this is now in java.desktop, though, it might be a good idea to look into it. Otherwise it will be yet another implementation dependency from javafx.graphics on java.desktop.
13-01-2016

I note that explicitly passing null for the ClassLoader is fragile. Better would be to use PerformanceTrackerHelper.class.getClassLoader() which is what we do in other places.
13-01-2016

Would it be easier to make a copy of PerformanceLogger (unless it is intended to record events from both JavaFX and java.desktop)?
13-01-2016

The following is the only reference to this class in JavaFX: com.sun.javafx.tk.quantum.PerformanceTrackerHelper: final Class perfLoggerClass = Class.forName("sun.misc.PerformanceLogger", true, null); This will be a straight-forward fix. Until then, the performance logger will be ignored (the code gracefully handles the case where the class cannot be found).
13-01-2016