690 }
691 assert(startup_recording_array != NULL, "invariant");
692 char* startup_options = NEW_C_HEAP_ARRAY(char, param_length + 1, mtTracing);
693 strncpy(startup_options, param_string, strlen(param_string) + 1);
694 assert(strncmp(param_string, startup_options, param_length) == 0, "invariant");
695 startup_recording_array->append(startup_options);
696 return false;
697 }
698
699 const GrowableArray<const char*>* JfrOptionSet::startup_recordings() {
700 return startup_recording_array;
701 }
702
703 void JfrOptionSet::release_startup_recordings() {
704 if (startup_recording_array != NULL) {
705 for (int i = 0; i < startup_recording_array->length(); ++i) {
706 FREE_C_HEAP_ARRAY(char, startup_recording_array->at(i));
707 }
708 }
709 delete startup_recording_array;
710 DEBUG_ONLY(startup_recording_array = NULL;)
711 }
712
713 bool JfrOptionSet::parse_flight_recorder_option(const JavaVMOption** option, char* tail) {
714 assert(option != NULL, "invariant");
715 assert(tail != NULL, "invariant");
716 assert((*option)->optionString != NULL, "invariant");
717 assert(strncmp((*option)->optionString, "-XX:FlightRecorderOptions", 25) == 0, "invariant");
718 if (tail != NULL) {
719 *tail = '='; // ":" -> "="
720 }
721 return false;
722 }
723
|
690 }
691 assert(startup_recording_array != NULL, "invariant");
692 char* startup_options = NEW_C_HEAP_ARRAY(char, param_length + 1, mtTracing);
693 strncpy(startup_options, param_string, strlen(param_string) + 1);
694 assert(strncmp(param_string, startup_options, param_length) == 0, "invariant");
695 startup_recording_array->append(startup_options);
696 return false;
697 }
698
699 const GrowableArray<const char*>* JfrOptionSet::startup_recordings() {
700 return startup_recording_array;
701 }
702
703 void JfrOptionSet::release_startup_recordings() {
704 if (startup_recording_array != NULL) {
705 for (int i = 0; i < startup_recording_array->length(); ++i) {
706 FREE_C_HEAP_ARRAY(char, startup_recording_array->at(i));
707 }
708 }
709 delete startup_recording_array;
710 startup_recording_array = NULL;
711 }
712
713 bool JfrOptionSet::parse_flight_recorder_option(const JavaVMOption** option, char* tail) {
714 assert(option != NULL, "invariant");
715 assert(tail != NULL, "invariant");
716 assert((*option)->optionString != NULL, "invariant");
717 assert(strncmp((*option)->optionString, "-XX:FlightRecorderOptions", 25) == 0, "invariant");
718 if (tail != NULL) {
719 *tail = '='; // ":" -> "="
720 }
721 return false;
722 }
723
|