void () { String javaSpecVendor = System.getProperty("java.vm.specification.vendor"); if (!"Oracle Corporation".equals(javaSpecVendor)) { LOG.warn("JitSuppressor functionality is not supported on non-Oracle vm. This one is " + javaSpecVendor); return; } if (!"true".equals(System.getProperty(SELF_ATTACH_PROP))) { String msg = "JitSuppressor wasn't registered. Please ensure the command line contains -D" + SELF_ATTACH_PROP + "=true"; if (ApplicationManagerEx.isInStressTest()) { LOG.warn(msg + " to get production-like performance"); } else if (!ApplicationManager.getApplication().isUnitTestMode()) { LOG.warn(msg); } return; } LOG.info("JitSuppressor is active"); ApplicationManager.getApplication().getMessageBus().connect().subscribe(PowerSaveMode.TOPIC, new PowerSaveMode.Listener() { @Override public void powerSaveStateChanged() { JitSuppressor.powerSaveStateChanged(); } }); // call the handler to make initial setup powerSaveStateChanged(); }