269 } |
269 } |
270 return false; |
270 return false; |
271 } |
271 } |
272 |
272 |
273 #if INCLUDE_JFR |
273 #if INCLUDE_JFR |
|
274 static bool _has_jfr_option = false; // is using JFR |
|
275 |
274 // return true on failure |
276 // return true on failure |
275 static bool match_jfr_option(const JavaVMOption** option) { |
277 static bool match_jfr_option(const JavaVMOption** option) { |
276 assert((*option)->optionString != NULL, "invariant"); |
278 assert((*option)->optionString != NULL, "invariant"); |
277 char* tail = NULL; |
279 char* tail = NULL; |
278 if (match_option(*option, "-XX:StartFlightRecording", (const char**)&tail)) { |
280 if (match_option(*option, "-XX:StartFlightRecording", (const char**)&tail)) { |
|
281 _has_jfr_option = true; |
279 return Jfr::on_start_flight_recording_option(option, tail); |
282 return Jfr::on_start_flight_recording_option(option, tail); |
280 } else if (match_option(*option, "-XX:FlightRecorderOptions", (const char**)&tail)) { |
283 } else if (match_option(*option, "-XX:FlightRecorderOptions", (const char**)&tail)) { |
|
284 _has_jfr_option = true; |
281 return Jfr::on_flight_recorder_option(option, tail); |
285 return Jfr::on_flight_recorder_option(option, tail); |
282 } |
286 } |
283 return false; |
287 return false; |
|
288 } |
|
289 |
|
290 bool Arguments::has_jfr_option() { |
|
291 return _has_jfr_option; |
284 } |
292 } |
285 #endif |
293 #endif |
286 |
294 |
287 static void logOption(const char* opt) { |
295 static void logOption(const char* opt) { |
288 if (PrintVMOptions) { |
296 if (PrintVMOptions) { |