Java Code Examples for sun.misc.PerformanceLogger#loggingEnabled()
The following examples show how to use
sun.misc.PerformanceLogger#loggingEnabled() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WToolkit.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 2
Source File: WToolkit.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 3
Source File: WToolkit.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 4
Source File: WToolkit.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 5
Source File: WToolkit.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 6
Source File: WToolkit.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 7
Source File: WToolkit.java From hottub with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 8
Source File: WToolkit.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); if (!startToolkitThread(this)) { Thread toolkitThread = new Thread(this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 9
Source File: XToolkit.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public XToolkit() { super(); if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("XToolkit construction"); } if (!GraphicsEnvironment.isHeadless()) { String mainClassName = null; StackTraceElement trace[] = (new Throwable()).getStackTrace(); int bottom = trace.length - 1; if (bottom >= 0) { mainClassName = trace[bottom].getClassName(); } if (mainClassName == null || mainClassName.equals("")) { mainClassName = "AWT"; } awtAppClassName = getCorrectXIDString(mainClassName); init(); XWM.init(); SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); PrivilegedAction<Thread> action = new PrivilegedAction() { public Thread run() { ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); ThreadGroup parentTG = currentTG.getParent(); while (parentTG != null) { currentTG = parentTG; parentTG = currentTG.getParent(); } Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT"); thread.setPriority(Thread.NORM_PRIORITY + 1); thread.setDaemon(true); return thread; } }; toolkitThread = AccessController.doPrivileged(action); toolkitThread.start(); } }
Example 10
Source File: WToolkit.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); if (!startToolkitThread(this)) { Thread toolkitThread = new Thread(this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 11
Source File: XToolkit.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public XToolkit() { super(); if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("XToolkit construction"); } if (!GraphicsEnvironment.isHeadless()) { String mainClassName = null; StackTraceElement trace[] = (new Throwable()).getStackTrace(); int bottom = trace.length - 1; if (bottom >= 0) { mainClassName = trace[bottom].getClassName(); } if (mainClassName == null || mainClassName.equals("")) { mainClassName = "AWT"; } awtAppClassName = getCorrectXIDString(mainClassName); init(); XWM.init(); SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); PrivilegedAction<Thread> action = new PrivilegedAction() { public Thread run() { ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); ThreadGroup parentTG = currentTG.getParent(); while (parentTG != null) { currentTG = parentTG; parentTG = currentTG.getParent(); } Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT"); thread.setPriority(Thread.NORM_PRIORITY + 1); thread.setDaemon(true); return thread; } }; toolkitThread = AccessController.doPrivileged(action); toolkitThread.start(); } }
Example 12
Source File: WToolkit.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 13
Source File: WToolkit.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }
Example 14
Source File: WToolkit.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { PerformanceLogger.setTime("WToolkit construction"); } sun.java2d.Disposer.addRecord(anchor, new ToolkitDisposer()); /* * Fix for 4701990. * AWTAutoShutdown state must be changed before the toolkit thread * starts to avoid race condition. */ AWTAutoShutdown.notifyToolkitThreadBusy(); // Find a root TG and attach Appkit thread to it ThreadGroup rootTG = AccessController.doPrivileged( (PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup); if (!startToolkitThread(this, rootTG)) { Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); toolkitThread.setDaemon(true); toolkitThread.start(); } try { synchronized(this) { while(!inited) { wait(); } } } catch (InterruptedException x) { // swallow the exception } // Enabled "live resizing" by default. It remains controlled // by the native system though. setDynamicLayout(true); areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled); }