mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8199712: Flight Recorder
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com> Reviewed-by: coleenp, ihse, erikj, dsamersoff, mseledtsov, egahlin, mgronlun
This commit is contained in:
parent
f575533a17
commit
a060be188d
1062 changed files with 119159 additions and 3164 deletions
|
@ -61,6 +61,9 @@
|
|||
#if INCLUDE_JVMCI
|
||||
#include "jvmci/jvmciRuntime.hpp"
|
||||
#endif
|
||||
#if INCLUDE_JFR
|
||||
#include "jfr/jfr.hpp"
|
||||
#endif
|
||||
|
||||
// Note: This is a special bug reporting site for the JVM
|
||||
#ifdef VENDOR_URL_VM_BUG
|
||||
|
@ -264,6 +267,20 @@ static bool match_option(const JavaVMOption* option, const char** names, const c
|
|||
return false;
|
||||
}
|
||||
|
||||
#if INCLUDE_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)) {
|
||||
return Jfr::on_start_flight_recording_option(option, tail);
|
||||
} else if (match_option(*option, "-XX:FlightRecorderOptions", (const char**)&tail)) {
|
||||
return Jfr::on_flight_recorder_option(option, tail);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void logOption(const char* opt) {
|
||||
if (PrintVMOptions) {
|
||||
jio_fprintf(defaultStream::output_stream(), "VM option '%s'\n", opt);
|
||||
|
@ -545,6 +562,8 @@ static SpecialFlag const special_jvm_flags[] = {
|
|||
{ "UseUTCFileTimestamp", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "UseAppCDS", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "InlineNotify", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "EnableTracing", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
{ "UseLockedTracing", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
|
||||
|
||||
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
|
||||
{ "dep > obs", JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
|
||||
|
@ -3159,6 +3178,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
|
|||
"ManagementServer is not supported in this VM.\n");
|
||||
return JNI_ERR;
|
||||
#endif // INCLUDE_MANAGEMENT
|
||||
#if INCLUDE_JFR
|
||||
} else if (match_jfr_option(&option)) {
|
||||
return JNI_EINVAL;
|
||||
#endif
|
||||
} else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
|
||||
// Skip -XX:Flags= and -XX:VMOptionsFile= since those cases have
|
||||
// already been handled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue