src/hotspot/share/jfr/recorder/jfrRecorder.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff src/hotspot/share/jfr/recorder

src/hotspot/share/jfr/recorder/jfrRecorder.cpp

Print this page




 164 }
 165 
 166 static bool startup_recordings(TRAPS) {
 167   const GrowableArray<const char*>* startup_options = JfrOptionSet::startup_recordings();
 168   if (startup_options == NULL) {
 169     return true;
 170   }
 171   const bool ret = launch_recordings(startup_options, THREAD);
 172   teardown_startup_support();
 173   return ret;
 174 }
 175 
 176 static void log_jdk_jfr_module_resolution_error(TRAPS) {
 177   LogTarget(Error, jfr, system) lt_error;
 178   LogTargetHandle handle(lt_error);
 179   LogStream stream(handle);
 180   JfrJavaSupport::is_jdk_jfr_module_available(&stream, THREAD);
 181 }
 182 
 183 bool JfrRecorder::on_vm_start() {





 184   const bool in_graph = JfrJavaSupport::is_jdk_jfr_module_available();
 185   Thread* const thread = Thread::current();
 186   if (!JfrOptionSet::initialize(thread)) {
 187     return false;
 188   }
 189   if (!register_jfr_dcmds()) {
 190     return false;
 191   }
 192   if (!validate_recording_options(thread)) {
 193     return false;
 194   }
 195   if (in_graph) {
 196     if (!JfrJavaEventWriter::initialize()) {
 197       return false;
 198     }
 199     if (!JfrOptionSet::configure(thread)) {
 200       return false;
 201     }
 202   }
 203   if (!is_enabled()) {




 164 }
 165 
 166 static bool startup_recordings(TRAPS) {
 167   const GrowableArray<const char*>* startup_options = JfrOptionSet::startup_recordings();
 168   if (startup_options == NULL) {
 169     return true;
 170   }
 171   const bool ret = launch_recordings(startup_options, THREAD);
 172   teardown_startup_support();
 173   return ret;
 174 }
 175 
 176 static void log_jdk_jfr_module_resolution_error(TRAPS) {
 177   LogTarget(Error, jfr, system) lt_error;
 178   LogTargetHandle handle(lt_error);
 179   LogStream stream(handle);
 180   JfrJavaSupport::is_jdk_jfr_module_available(&stream, THREAD);
 181 }
 182 
 183 bool JfrRecorder::on_vm_start() {
 184   if (DumpSharedSpaces && (JfrOptionSet::startup_recordings() != NULL)) {
 185     warning("JFR will be disabled during CDS dumping");
 186     teardown_startup_support();
 187     return true;
 188   }
 189   const bool in_graph = JfrJavaSupport::is_jdk_jfr_module_available();
 190   Thread* const thread = Thread::current();
 191   if (!JfrOptionSet::initialize(thread)) {
 192     return false;
 193   }
 194   if (!register_jfr_dcmds()) {
 195     return false;
 196   }
 197   if (!validate_recording_options(thread)) {
 198     return false;
 199   }
 200   if (in_graph) {
 201     if (!JfrJavaEventWriter::initialize()) {
 202       return false;
 203     }
 204     if (!JfrOptionSet::configure(thread)) {
 205       return false;
 206     }
 207   }
 208   if (!is_enabled()) {


src/hotspot/share/jfr/recorder/jfrRecorder.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File