8222379: JFR TestClassLoadEvent.java failed due to EXCEPTION_ACCESS_VIOLATION

Give fatal error if CDS loses archive mapping.

Reviewed-by: iklam, ccheung, jiangli
This commit is contained in:
Coleen Phillimore 2019-04-18 07:02:07 -04:00
parent 133401ac02
commit 733d251078
5 changed files with 32 additions and 17 deletions

View file

@ -271,17 +271,25 @@ static bool match_option(const JavaVMOption* option, const char** names, const c
}
#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) {