Review request: 8011380: FX dependency on PlatformLogger broken (original) (raw)
Mandy Chung mandy.chung at oracle.com
Thu Apr 4 04:52:06 UTC 2013
- Previous message: hg: jdk8/tl: 8011350: hgforest.sh uses non-POSIX sh features that may fail with some shells
- Next message: Review request: 8011380: FX dependency on PlatformLogger broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Peter, Laurent,
History and details are described below.
Webrev at: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8011380/webrev.00/
I add back the getLevel(int), setLevel(int) and isLoggable(int) methods but marked deprecated and also revert the static final variables to resolve the regression. They can be removed when JavaFX transitions to use the Level enums (I'll file one issue for FX to use PlatformLogger.Level and one for core-libs to remove the deprecated methods). The performance overhead is likely small since it's direct mapping from int to the Level enum that was used in one of your previous performance measurement.
Laurent - you have a patch to add isLoggable calls in the awt/swing code. Can you check if there is any noticeable performance difference?
I also take the opportunity to reconsider what JavaLoggerProxy.getLevel() should return when it's a custom Level. Use of logging is expected not to cause any fatal error to the running application. The previous patch throwing IAE needs to be fixed. I propose to return the first Level.intValue() >= the custom level value since the level value is used to evaluate if it's loggable.
History and details:
JavaFX 8 has converted to use sun.util.logging.PlatformLogger
(https://javafx-jira.kenai.com/browse/RT-24458). I was involved in the
early discussion but wasn't aware of the decision made. Thanks to Alan
for catching this regression out before it's integrated to jdk8.
jfxrt.jar is cobundled with jdk8 during the installer build step. My
build doesn't build installer and thus we didn't see this regression.
I ran jdeps on jdk8/lib/ext/jfxrt.jar (windows-i586) that shows 112 references to PlatformLogger and on jdk7/lib/jfxrt.jar that shows no reference to sun.util.logging.
I have a method finder tool (planning to include it in jdk8) to search for use of PlatformLogger.getLevel and it did find 2 references from jdk8/lib/ext/jfxrt.jar.
JavaFX 8 is going to upgrade to use JDK 8 for JavaFX build (https://javafx-jira.kenai.com/browse/RT-27794) soon (currently it's built with JDK 7). As soon as JavaFX code are changed to reference PlatformLogger.Level enum instead, we can remove the deprecated methods and change the PlatformLogger constants.
JavaFX 2.2.x doesn't use sun.util.logging and so this has no impact to it. In any case, JavaFX 2.2.x only runs either bundled with a corresponding JDK 7u release, or as a standalone library for JDK 6 only.
Thanks Mandy
- Previous message: hg: jdk8/tl: 8011350: hgforest.sh uses non-POSIX sh features that may fail with some shells
- Next message: Review request: 8011380: FX dependency on PlatformLogger broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]