8198635: Remove unused safepoint message functions and ShowSafepointMsgs
Reviewed-by: eosterlund, gtriantafill
--- a/src/hotspot/share/runtime/arguments.cpp Fri Feb 23 10:14:23 2018 -0800
+++ b/src/hotspot/share/runtime/arguments.cpp Fri Feb 23 14:13:06 2018 -0500
@@ -530,6 +530,7 @@
{ "CheckAssertionStatusDirectives",JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
{ "PrintMallocFree", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
{ "PrintMalloc", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
+ { "ShowSafepointMsgs", JDK_Version::undefined(), JDK_Version::jdk(11), JDK_Version::jdk(12) },
{ "FastTLABRefill", JDK_Version::jdk(10), JDK_Version::jdk(11), JDK_Version::jdk(12) },
{ "PermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::undefined() },
{ "MaxPermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::undefined() },
--- a/src/hotspot/share/runtime/globals.hpp Fri Feb 23 10:14:23 2018 -0800
+++ b/src/hotspot/share/runtime/globals.hpp Fri Feb 23 14:13:06 2018 -0500
@@ -842,9 +842,6 @@
product(bool, FailOverToOldVerifier, true, \
"Fail over to old verifier when split verifier fails") \
\
- develop(bool, ShowSafepointMsgs, false, \
- "Show message about safepoint synchronization") \
- \
product(bool, SafepointTimeout, false, \
"Time out and warn or fail after SafepointTimeoutDelay " \
"milliseconds if failed to reach safepoint") \
--- a/src/hotspot/share/runtime/safepoint.cpp Fri Feb 23 10:14:23 2018 -0800
+++ b/src/hotspot/share/runtime/safepoint.cpp Fri Feb 23 14:13:06 2018 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -893,10 +893,6 @@
assert(SafepointSynchronize::is_synchronizing(), "polling encountered outside safepoint synchronization");
}
- if (ShowSafepointMsgs) {
- tty->print("handle_polling_page_exception: ");
- }
-
if (PrintSafepointStatistics) {
inc_page_trap_count();
}
@@ -1098,9 +1094,6 @@
"polling page exception on thread not running state: %u", uint(t));
// Step 1: Find the nmethod from the return address
- if (ShowSafepointMsgs && Verbose) {
- tty->print_cr("Polling page exception at " INTPTR_FORMAT, p2i(thread()->saved_exception_pc()));
- }
address real_return_addr = thread()->saved_exception_pc();
CodeBlob *cb = CodeCache::find_blob(real_return_addr);
@@ -1421,32 +1414,3 @@
INT64_FORMAT_W(5) " ms",
(int64_t)(_max_vmop_time / MICROUNITS));
}
-
-// ------------------------------------------------------------------------------------------------
-// Non-product code
-
-#ifndef PRODUCT
-
-void SafepointSynchronize::print_state() {
- if (_state == _not_synchronized) {
- tty->print_cr("not synchronized");
- } else if (_state == _synchronizing || _state == _synchronized) {
- tty->print_cr("State: %s", (_state == _synchronizing) ? "synchronizing" :
- "synchronized");
-
- for (JavaThreadIteratorWithHandle jtiwh; JavaThread *cur = jtiwh.next(); ) {
- cur->safepoint_state()->print();
- }
- }
-}
-
-void SafepointSynchronize::safepoint_msg(const char* format, ...) {
- if (ShowSafepointMsgs) {
- va_list ap;
- va_start(ap, format);
- tty->vprint_cr(format, ap);
- va_end(ap);
- }
-}
-
-#endif // !PRODUCT
--- a/src/hotspot/share/runtime/safepoint.hpp Fri Feb 23 10:14:23 2018 -0800
+++ b/src/hotspot/share/runtime/safepoint.hpp Fri Feb 23 14:13:06 2018 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -191,10 +191,6 @@
static bool is_cleanup_needed();
static void do_cleanup_tasks();
- // Debugging
- static void print_state() PRODUCT_RETURN;
- static void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(1, 2) PRODUCT_RETURN;
-
static void deferred_initialize_stat();
static void print_stat_on_exit();
inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; }
@@ -258,15 +254,6 @@
// Initialize
static void create(JavaThread *thread);
static void destroy(JavaThread *thread);
-
- void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) {
- if (ShowSafepointMsgs) {
- va_list ap;
- va_start(ap, format);
- tty->vprint_cr(format, ap);
- va_end(ap);
- }
- }
};
--- a/src/hotspot/share/utilities/debug.cpp Fri Feb 23 10:14:23 2018 -0800
+++ b/src/hotspot/share/utilities/debug.cpp Fri Feb 23 14:13:06 2018 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -503,12 +503,6 @@
SystemDictionary::print();
}
-
-extern "C" void safepoints() {
- Command c("safepoints");
- SafepointSynchronize::print_state();
-}
-
#endif // !PRODUCT
extern "C" void pss() { // print all stacks