-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b62
-
generic
-
solaris_9
As part of the changes for 6253009, we promoted the XToolkit.awtLock() and related
methods up into SunToolkit so that they can be called independent of the current
toolkit (or from shared code, as in the OGL case). It appears that we have a class
called sun.awt.motif.AWTLockAccess with static methods just like the ones in
XToolkit (now in SunToolkit). These methods in AWTLockAccess call down to JNI and
invoke the AWT_LOCK() and similar macros.
This approach in AWTLockAccess is probably a bit slower than using the equivalent
methods in SunToolkit, which use Unsafe.monitorEnter() (as of b51 and earlier).
However, in 6317330 we are proposing to replace the Unsafe-based implementations
of these methods with ReentrantLock for improved performance. If we go with that
change, then not only does the AWTLockAccess class become obsolete, it becomes a
performance issue because a call to awtLock() for example will look like:
AWTLockAccess.awtLock()
JNI downcall to AWT_LOCK()
JNI upcall to SunToolkit.awtLock()
call into ReentrantLock.lock()...
Therefore, we should eliminate AWTLockAccess altogether and replace calls with
their SunToolkit equivalents.
methods up into SunToolkit so that they can be called independent of the current
toolkit (or from shared code, as in the OGL case). It appears that we have a class
called sun.awt.motif.AWTLockAccess with static methods just like the ones in
XToolkit (now in SunToolkit). These methods in AWTLockAccess call down to JNI and
invoke the AWT_LOCK() and similar macros.
This approach in AWTLockAccess is probably a bit slower than using the equivalent
methods in SunToolkit, which use Unsafe.monitorEnter() (as of b51 and earlier).
However, in 6317330 we are proposing to replace the Unsafe-based implementations
of these methods with ReentrantLock for improved performance. If we go with that
change, then not only does the AWTLockAccess class become obsolete, it becomes a
performance issue because a call to awtLock() for example will look like:
AWTLockAccess.awtLock()
JNI downcall to AWT_LOCK()
JNI upcall to SunToolkit.awtLock()
call into ReentrantLock.lock()...
Therefore, we should eliminate AWTLockAccess altogether and replace calls with
their SunToolkit equivalents.
- relates to
-
JDK-6844732 RFE: make native function re sun.awt.motif.AWTLockAccess.awtLock() publicly accessible again
-
- Closed
-