Skip to content

Commit

Permalink
8279913: obsolete ExtendedDTraceProbes
Browse files Browse the repository at this point in the history
Reviewed-by: thartmann, chagedorn
  • Loading branch information
eme64 committed Nov 3, 2022
1 parent 13b20e0 commit 1950747
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 39 deletions.
13 changes: 3 additions & 10 deletions src/hotspot/share/ci/ciEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,8 @@ bool ciEnv::jvmti_state_changed() const {
// Cache DTrace flags
void ciEnv::cache_dtrace_flags() {
// Need lock?
_dtrace_extended_probes = ExtendedDTraceProbes;
if (_dtrace_extended_probes) {
_dtrace_method_probes = true;
_dtrace_alloc_probes = true;
} else {
_dtrace_method_probes = DTraceMethodProbes;
_dtrace_alloc_probes = DTraceAllocProbes;
}
_dtrace_method_probes = DTraceMethodProbes;
_dtrace_alloc_probes = DTraceAllocProbes;
}

// ------------------------------------------------------------------
Expand Down Expand Up @@ -1087,8 +1081,7 @@ void ciEnv::register_method(ciMethod* target,

// Change in DTrace flags may invalidate compilation.
if (!failing() &&
( (!dtrace_extended_probes() && ExtendedDTraceProbes) ||
(!dtrace_method_probes() && DTraceMethodProbes) ||
( (!dtrace_method_probes() && DTraceMethodProbes) ||
(!dtrace_alloc_probes() && DTraceAllocProbes) )) {
record_failure("DTrace flags change invalidated dependencies");
}
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/share/ci/ciEnv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class ciEnv : StackObj {
bool _jvmti_can_walk_any_space;

// Cache DTrace flags
bool _dtrace_extended_probes;
bool _dtrace_method_probes;
bool _dtrace_alloc_probes;

Expand Down Expand Up @@ -358,7 +357,6 @@ class ciEnv : StackObj {

// Cache DTrace flags
void cache_dtrace_flags();
bool dtrace_extended_probes() const { return _dtrace_extended_probes; }
bool dtrace_method_probes() const { return _dtrace_method_probes; }
bool dtrace_alloc_probes() const { return _dtrace_alloc_probes; }

Expand Down
23 changes: 2 additions & 21 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2836,26 +2836,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
tail);
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+ExtendedDTraceProbes")) {
#if defined(DTRACE_ENABLED)
warning("Option ExtendedDTraceProbes was deprecated in version 19 and will likely be removed in a future release.");
warning("Use the combination of -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes and -XX:+DTraceMonitorProbes instead.");
if (FLAG_SET_CMDLINE(ExtendedDTraceProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(DTraceMethodProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(DTraceAllocProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(DTraceMonitorProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
#else // defined(DTRACE_ENABLED)
jio_fprintf(defaultStream::error_stream(),
"ExtendedDTraceProbes flag is not applicable for this configuration\n");
return JNI_EINVAL;
#if !defined(DTRACE_ENABLED)
} else if (match_option(option, "-XX:+DTraceMethodProbes")) {
jio_fprintf(defaultStream::error_stream(),
"DTraceMethodProbes flag is not applicable for this configuration\n");
Expand All @@ -2868,7 +2849,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
jio_fprintf(defaultStream::error_stream(),
"DTraceMonitorProbes flag is not applicable for this configuration\n");
return JNI_EINVAL;
#endif // defined(DTRACE_ENABLED)
#endif // !defined(DTRACE_ENABLED)
#ifdef ASSERT
} else if (match_option(option, "-XX:+FullGCALot")) {
if (FLAG_SET_CMDLINE(FullGCALot, true) != JVMFlag::SUCCESS) {
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/runtime/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1819,11 +1819,6 @@ const int ObjectAlignmentInBytes = 8;
product(bool, PauseAtExit, false, DIAGNOSTIC, \
"Pause and wait for keypress on exit if a debugger is attached") \
\
product(bool, ExtendedDTraceProbes, false, \
"(Deprecated) Enable performance-impacting dtrace probes. " \
"Use the combination of -XX:+DTraceMethodProbes, " \
"-XX:+DTraceAllocProbes and -XX:+DTraceMonitorProbes instead.") \
\
product(bool, DTraceMethodProbes, false, \
"Enable dtrace tool probes for method-entry and method-exit") \
\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public static void main(String[] args) throws Throwable {
}

String[] options = {
"ExtendedDTraceProbes",
"DTraceMethodProbes",
"DTraceAllocProbes",
"DTraceMonitorProbes",
Expand Down

1 comment on commit 1950747

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.