8209856: Obsolete error reporter
authormikael
Wed, 29 Aug 2018 13:04:50 -0700
changeset 51579 d7fc38d3fc8d
parent 51578 31b159f30fb2
child 51580 0cd55d573893
8209856: Obsolete error reporter Reviewed-by: coleenp, stuefe
make/nb_native/nbproject/configurations.xml
src/hotspot/share/runtime/arguments.cpp
src/hotspot/share/runtime/globals.hpp
src/hotspot/share/utilities/errorReporter.cpp
src/hotspot/share/utilities/errorReporter.hpp
src/hotspot/share/utilities/vmError.cpp
test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java
test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java
test/hotspot/jtreg/runtime/ErrorHandling/ErrorHandler.java
test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java
test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java
test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency1.java
test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency2.java
test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency3.java
test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency4.java
test/hotspot/jtreg/runtime/Unsafe/RangeCheck.java
test/hotspot/jtreg/runtime/memory/ReserveMemory.java
test/hotspot/jtreg/serviceability/sa/TestJmapCore.java
test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java
--- a/make/nb_native/nbproject/configurations.xml	Wed Aug 29 20:15:09 2018 +0200
+++ b/make/nb_native/nbproject/configurations.xml	Wed Aug 29 13:04:50 2018 -0700
@@ -2843,8 +2843,6 @@
               <in>elfStringTable.hpp</in>
               <in>elfSymbolTable.cpp</in>
               <in>elfSymbolTable.hpp</in>
-              <in>errorReporter.cpp</in>
-              <in>errorReporter.hpp</in>
               <in>events.cpp</in>
               <in>events.hpp</in>
               <in>exceptions.cpp</in>
@@ -15166,16 +15164,6 @@
             tool="3"
             flavor2="0">
       </item>
-      <item path="../../src/hotspot/share/utilities/errorReporter.cpp"
-            ex="false"
-            tool="1"
-            flavor2="0">
-      </item>
-      <item path="../../src/hotspot/share/utilities/errorReporter.hpp"
-            ex="false"
-            tool="3"
-            flavor2="0">
-      </item>
       <item path="../../src/hotspot/share/utilities/events.cpp"
             ex="false"
             tool="1"
@@ -28948,16 +28936,6 @@
             tool="3"
             flavor2="0">
       </item>
-      <item path="../../src/hotspot/share/utilities/errorReporter.cpp"
-            ex="false"
-            tool="1"
-            flavor2="0">
-      </item>
-      <item path="../../src/hotspot/share/utilities/errorReporter.hpp"
-            ex="false"
-            tool="3"
-            flavor2="0">
-      </item>
       <item path="../../src/hotspot/share/utilities/events.cpp"
             ex="false"
             tool="1"
--- a/src/hotspot/share/runtime/arguments.cpp	Wed Aug 29 20:15:09 2018 +0200
+++ b/src/hotspot/share/runtime/arguments.cpp	Wed Aug 29 13:04:50 2018 -0700
@@ -572,6 +572,8 @@
   { "PrintSafepointStatistics",      JDK_Version::jdk(11),     JDK_Version::jdk(12), JDK_Version::jdk(13) },
   { "PrintSafepointStatisticsTimeout",JDK_Version::jdk(11),    JDK_Version::jdk(12), JDK_Version::jdk(13) },
   { "PrintSafepointStatisticsCount", JDK_Version::jdk(11),     JDK_Version::jdk(12), JDK_Version::jdk(13) },
+  { "TransmitErrorReport",           JDK_Version::undefined(), JDK_Version::jdk(12), JDK_Version::jdk(13) },
+  { "ErrorReportServer",             JDK_Version::undefined(), JDK_Version::jdk(12), JDK_Version::jdk(13) },
 
 #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
   { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
--- a/src/hotspot/share/runtime/globals.hpp	Wed Aug 29 20:15:09 2018 +0200
+++ b/src/hotspot/share/runtime/globals.hpp	Wed Aug 29 13:04:50 2018 -0700
@@ -2417,12 +2417,6 @@
   manageable(bool, PrintConcurrentLocks, false,                             \
           "Print java.util.concurrent locks in thread dump")                \
                                                                             \
-  product(bool, TransmitErrorReport, false,                                 \
-          "Enable error report transmission on erroneous termination")      \
-                                                                            \
-  product(ccstr, ErrorReportServer, NULL,                                   \
-          "Override built-in error report server address")                  \
-                                                                            \
   /* Shared spaces */                                                       \
                                                                             \
   product(bool, UseSharedSpaces, true,                                      \
--- a/src/hotspot/share/utilities/errorReporter.cpp	Wed Aug 29 20:15:09 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2011, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-#include "utilities/errorReporter.hpp"
-
-ErrorReporter::ErrorReporter() {}
-
-void ErrorReporter::call(FILE* fd, char* buffer, int length) {
-}
-
--- a/src/hotspot/share/utilities/errorReporter.hpp	Wed Aug 29 20:15:09 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_UTILITIES_ERRORREPORTER_HPP
-#define SHARE_VM_UTILITIES_ERRORREPORTER_HPP
-
-#include "utilities/globalDefinitions.hpp"
-#include "memory/allocation.hpp"
-
-class ErrorReporter : public StackObj {
-
-public:
-  ErrorReporter();
-  ~ErrorReporter(){};
-
-  void call(FILE* fd, char *buffer, int length);
-};
-
-#endif // ndef SHARE_VM_UTILITIES_ERRORREPORTER_HPP
--- a/src/hotspot/share/utilities/vmError.cpp	Wed Aug 29 20:15:09 2018 +0200
+++ b/src/hotspot/share/utilities/vmError.cpp	Wed Aug 29 13:04:50 2018 -0700
@@ -47,7 +47,6 @@
 #include "utilities/debug.hpp"
 #include "utilities/decoder.hpp"
 #include "utilities/defaultStream.hpp"
-#include "utilities/errorReporter.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
 #include "utilities/macros.hpp"
@@ -1287,7 +1286,6 @@
   // then save detailed information in log file (verbose = true).
   static bool out_done = false;         // done printing to standard out
   static bool log_done = false;         // done saving error log
-  static bool transmit_report_done = false; // done error reporting
 
   if (SuppressFatalErrorMessage) {
       os::abort(CreateCoredumpOnCrash);
@@ -1433,9 +1431,6 @@
       } else {
         out.print_raw_cr("# Can not save log file, dump to screen..");
         log.set_fd(defaultStream::output_fd());
-        /* Error reporting currently needs dumpfile.
-         * Maybe implement direct streaming in the future.*/
-        transmit_report_done = true;
       }
     }
 
@@ -1444,20 +1439,6 @@
     _current_step = 0;
     _current_step_info = "";
 
-    // Run error reporting to determine whether or not to report the crash.
-    if (!transmit_report_done && should_report_bug(_id)) {
-      transmit_report_done = true;
-      const int fd2 = ::dup(log.fd());
-      if (fd2 != -1) {
-        FILE* const hs_err = ::fdopen(fd2, "r");
-        if (NULL != hs_err) {
-          ErrorReporter er;
-          er.call(hs_err, buffer, O_BUFLEN);
-          ::fclose(hs_err);
-        }
-      }
-    }
-
     if (log.fd() != defaultStream::output_fd()) {
       close(log.fd());
     }
--- a/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java	Wed Aug 29 13:04:50 2018 -0700
@@ -65,7 +65,7 @@
         "-XX:MetaspaceSize=4m", "-XX:MaxMetaspaceSize=16m", "-XX:InitialCodeCacheSize=512k",
         "-XX:ReservedCodeCacheSize=4m", "-XX:ThreadStackSize=512", "-XX:VMThreadStackSize=512",
         "-XX:CompilerThreadStackSize=512", "-XX:ParallelGCThreads=1", "-XX:CICompilerCount=2",
-        "-Xcomp", "-XX:CICrashAt=1", "-XX:+DumpReplayDataOnError", "-XX:-TransmitErrorReport",
+        "-Xcomp", "-XX:CICrashAt=1", "-XX:+DumpReplayDataOnError",
         "-XX:+PreferInterpreterNativeStubs", "-XX:+PrintCompilation", REPLAY_FILE_OPTION};
     private static final String[] REPLAY_OPTIONS = new String[]{DISABLE_COREDUMP_ON_CRASH,
         "-XX:+ReplayCompiles", REPLAY_FILE_OPTION};
--- a/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java	Wed Aug 29 13:04:50 2018 -0700
@@ -57,7 +57,7 @@
     public static OutputAnalyzer runTest(String option) throws Exception {
         return new OutputAnalyzer(
             ProcessTools.createJavaProcessBuilder(
-            "-Xmx128m", "-XX:-TransmitErrorReport", "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", option, Crasher.class.getName())
+            "-Xmx128m", "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", option, Crasher.class.getName())
             .start());
     }
 }
--- a/test/hotspot/jtreg/runtime/ErrorHandling/ErrorHandler.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/ErrorHandling/ErrorHandler.java	Wed Aug 29 13:04:50 2018 -0700
@@ -43,7 +43,7 @@
         // The -XX:ErrorHandlerTest=N option requires debug bits.
         return new OutputAnalyzer(
             ProcessTools.createJavaProcessBuilder(
-            "-XX:-TransmitErrorReport", "-XX:-CreateCoredumpOnCrash", "-XX:ErrorHandlerTest=" + testcase)
+            "-XX:-CreateCoredumpOnCrash", "-XX:ErrorHandlerTest=" + testcase)
             .start());
     }
 
--- a/test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/ErrorHandling/ProblematicFrameTest.java	Wed Aug 29 13:04:50 2018 -0700
@@ -47,7 +47,7 @@
 
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            "-Xmx64m", "-XX:-TransmitErrorReport", "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName());
+            "-Xmx64m", "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName());
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         output.shouldNotContain("Exception in thread");
         output.shouldNotMatch("error occurred during error reporting \\(printing problematic frame\\)");
--- a/test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java	Wed Aug 29 13:04:50 2018 -0700
@@ -41,7 +41,6 @@
         String msg = "Test Succeeded";
 
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-           "-XX:-TransmitErrorReport",
            "-XX:-CreateCoredumpOnCrash",
            "-XX:ErrorHandlerTest=12", // trigger potential SEGV
            "-XX:OnError=echo " + msg,
--- a/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency1.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency1.java	Wed Aug 29 13:04:50 2018 -0700
@@ -50,7 +50,6 @@
                   "-Xbootclasspath/a:.",
                   "-XX:+UnlockDiagnosticVMOptions",
                   "-XX:+WhiteBoxAPI",
-                  "-XX:-TransmitErrorReport",
                   "-XX:-CreateCoredumpOnCrash",
                   "-Xmx128m",
                   "AssertSafepointCheckConsistency1",
--- a/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency2.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency2.java	Wed Aug 29 13:04:50 2018 -0700
@@ -50,7 +50,6 @@
                   "-Xbootclasspath/a:.",
                   "-XX:+UnlockDiagnosticVMOptions",
                   "-XX:+WhiteBoxAPI",
-                  "-XX:-TransmitErrorReport",
                   "-XX:-CreateCoredumpOnCrash",
                   "-Xmx128m",
                   "AssertSafepointCheckConsistency2",
--- a/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency3.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency3.java	Wed Aug 29 13:04:50 2018 -0700
@@ -50,7 +50,6 @@
                   "-Xbootclasspath/a:.",
                   "-XX:+UnlockDiagnosticVMOptions",
                   "-XX:+WhiteBoxAPI",
-                  "-XX:-TransmitErrorReport",
                   "-XX:-CreateCoredumpOnCrash",
                   "-Xmx32m",
                   "AssertSafepointCheckConsistency3",
--- a/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency4.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/Safepoint/AssertSafepointCheckConsistency4.java	Wed Aug 29 13:04:50 2018 -0700
@@ -50,7 +50,6 @@
                "-Xbootclasspath/a:.",
                "-XX:+UnlockDiagnosticVMOptions",
                "-XX:+WhiteBoxAPI",
-               "-XX:-TransmitErrorReport",
                "-XX:-CreateCoredumpOnCrash",
                "-Xmx32m",
                "AssertSafepointCheckConsistency4",
--- a/test/hotspot/jtreg/runtime/Unsafe/RangeCheck.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/Unsafe/RangeCheck.java	Wed Aug 29 13:04:50 2018 -0700
@@ -48,7 +48,6 @@
                 true,
                 "-Xmx128m",
                 "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED",
-                "-XX:-TransmitErrorReport",
                 "-XX:-CreateCoredumpOnCrash",
                 "-XX:-InlineUnsafeOps", // The compiler intrinsics doesn't have the assert
                 DummyClassWithMainRangeCheck.class.getName());
--- a/test/hotspot/jtreg/runtime/memory/ReserveMemory.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/runtime/memory/ReserveMemory.java	Wed Aug 29 13:04:50 2018 -0700
@@ -55,7 +55,6 @@
           "-Xbootclasspath/a:.",
           "-XX:+UnlockDiagnosticVMOptions",
           "-XX:+WhiteBoxAPI",
-          "-XX:-TransmitErrorReport",
           "-XX:-CreateCoredumpOnCrash",
           "-Xmx128m",
           "ReserveMemory",
--- a/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java	Wed Aug 29 13:04:50 2018 -0700
@@ -87,7 +87,7 @@
 
     static void test(String type) throws Throwable {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, "-XX:+CreateCoredumpOnCrash",
-                "-XX:MaxMetaspaceSize=64m", "-XX:+CrashOnOutOfMemoryError", "-XX:-TransmitErrorReport",
+                "-XX:MaxMetaspaceSize=64m", "-XX:+CrashOnOutOfMemoryError",
                 TestJmapCore.class.getName(), type);
 
         boolean useDefaultUlimit = useDefaultUlimit();
--- a/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java	Wed Aug 29 20:15:09 2018 +0200
+++ b/test/jdk/jdk/jfr/jvm/TestDumpOnCrash.java	Wed Aug 29 13:04:50 2018 -0700
@@ -69,7 +69,6 @@
             ProcessTools.createJavaProcessBuilder(true,
                 "-Xmx64m",
                 "-Xint",
-                "-XX:-TransmitErrorReport",
                 "-XX:-CreateCoredumpOnCrash",
                 "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED",
                 "-XX:StartFlightRecording=dumponexit=true",