src/hotspot/share/runtime/arguments.cpp
changeset 54573 b73893f7fee3
parent 54322 cf75ea6af695
child 54585 3452d108d06d
--- a/src/hotspot/share/runtime/arguments.cpp	Fri Apr 12 09:13:50 2019 +0200
+++ b/src/hotspot/share/runtime/arguments.cpp	Thu Apr 18 07:02:07 2019 -0400
@@ -271,17 +271,25 @@
 }
 
 #if INCLUDE_JFR
+static bool _has_jfr_option = false;  // is using JFR
+
 // return true on failure
 static bool match_jfr_option(const JavaVMOption** option) {
   assert((*option)->optionString != NULL, "invariant");
   char* tail = NULL;
   if (match_option(*option, "-XX:StartFlightRecording", (const char**)&tail)) {
+    _has_jfr_option = true;
     return Jfr::on_start_flight_recording_option(option, tail);
   } else if (match_option(*option, "-XX:FlightRecorderOptions", (const char**)&tail)) {
+    _has_jfr_option = true;
     return Jfr::on_flight_recorder_option(option, tail);
   }
   return false;
 }
+
+bool Arguments::has_jfr_option() {
+  return _has_jfr_option;
+}
 #endif
 
 static void logOption(const char* opt) {