8205996: JDK-8205906 broke the build on Mac
authormgronlun
Thu, 28 Jun 2018 13:58:30 +0200
changeset 50877 700fffd3c871
parent 50876 bfd3c5dfcbea
child 50878 fb7800b66c92
8205996: JDK-8205906 broke the build on Mac Reviewed-by: thartmann, ehelin
src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
--- a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp	Thu Jun 28 03:45:49 2018 -0700
+++ b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp	Thu Jun 28 13:58:30 2018 +0200
@@ -665,13 +665,11 @@
   return true;
 }
 
-static const char XXFlightRecorderOptions[] = "-XX:FlightRecorderOptions";
-
 bool JfrOptionSet::parse_flight_recorder_option(const JavaVMOption** option, char* delimiter) {
   assert(option != NULL, "invariant");
   assert(delimiter != NULL, "invariant");
   assert((*option)->optionString != NULL, "invariant");
-  assert(strncmp((*option)->optionString, XXFlightRecorderOptions, sizeof XXFlightRecorderOptions - 1) == 0, "invariant");
+  assert(strncmp((*option)->optionString, "-XX:FlightRecorderOptions", 25) == 0, "invariant");
   if (*delimiter == '\0') {
     // -XX:FlightRecorderOptions without any delimiter and values
   } else {
@@ -683,20 +681,19 @@
 }
 
 static GrowableArray<const char*>* startup_recording_options_array = NULL;
-static const char XXStartFlightRecordingOption[] = "-XX:StartFlightRecording";
 
 bool JfrOptionSet::parse_start_flight_recording_option(const JavaVMOption** option, char* delimiter) {
   assert(option != NULL, "invariant");
   assert(delimiter != NULL, "invariant");
   assert((*option)->optionString != NULL, "invariant");
-  assert(strncmp((*option)->optionString, XXStartFlightRecordingOption, sizeof XXStartFlightRecordingOption - 1) == 0, "invariant");
+  assert(strncmp((*option)->optionString, "-XX:StartFlightRecording", 24) == 0, "invariant");
   const char* value = NULL;
   if (*delimiter == '\0') {
     // -XX:StartFlightRecording without any delimiter and values
     // Add dummy value "dumponexit=false" so -XX:StartFlightRecording can be used without explicit values.
     // The existing option->optionString points to stack memory so no need to deallocate.
     const_cast<JavaVMOption*>(*option)->optionString = (char*)"-XX:StartFlightRecording=dumponexit=false";
-    value = (*option)->optionString + sizeof XXStartFlightRecordingOption;
+    value = (*option)->optionString + 25;
   } else {
     // -XX:StartFlightRecording[=|:]
     // set delimiter to '='