Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot.jfr/src/jdk/vm/ci/hotspot/jfr/events/JFREventProvider.java @ 23679:b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 15 Jun 2016 00:00:41 +0200 |
parents | 1d4ce2d19e52 |
children | 5cf445d2acf6 |
comparison
equal
deleted
inserted
replaced
23678:e86a0b0ba969 | 23679:b5557b757040 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package jdk.vm.ci.hotspot.jfr.events; | 23 package jdk.vm.ci.hotspot.jfr.events; |
24 | 24 |
25 import static jdk.vm.ci.hotspot.HotSpotVMConfig.config; | |
26 | |
27 import java.net.URISyntaxException; | 25 import java.net.URISyntaxException; |
28 | 26 |
27 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; | |
28 import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; | |
29 import jdk.vm.ci.hotspot.services.EventProvider; | 29 import jdk.vm.ci.hotspot.services.EventProvider; |
30 | 30 |
31 /** | 31 /** |
32 * A JFR implementation for {@link EventProvider}. This implementation is used when Flight Recorder | 32 * A JFR implementation for {@link EventProvider}. This implementation is used when Flight Recorder |
33 * is turned on. | 33 * is turned on. |
44 * Need to store the producer in a field so that it doesn't disappear. | 44 * Need to store the producer in a field so that it doesn't disappear. |
45 */ | 45 */ |
46 @SuppressWarnings("unused") private final com.oracle.jrockit.jfr.Producer producer; | 46 @SuppressWarnings("unused") private final com.oracle.jrockit.jfr.Producer producer; |
47 | 47 |
48 public JFREventProvider() { | 48 public JFREventProvider() { |
49 enabled = config().flightRecorder; | 49 HotSpotVMConfigAccess config = new HotSpotVMConfigAccess(HotSpotJVMCIRuntime.runtime().getConfigStore()); |
50 enabled = config.getFlag("FightRecorder", Boolean.class, false); | |
50 com.oracle.jrockit.jfr.Producer p = null; | 51 com.oracle.jrockit.jfr.Producer p = null; |
51 if (enabled) { | 52 if (enabled) { |
52 try { | 53 try { |
53 /* | 54 /* |
54 * The "HotSpot JVM" producer is a native producer and we cannot use it. So we | 55 * The "HotSpot JVM" producer is a native producer and we cannot use it. So we |