Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8270093

The path of JFR emergency dump should be able to specified by the user

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Withdrawn
    • Icon: P4 P4
    • 18
    • hotspot
    • None
    • jfr
    • behavioral
    • minimal
    • This CSR adds new -XX option, if it is not specified the behavior is not changed.
    • add/remove/modify command line option
    • Implementation

      Summary

      Introduce -XX:JFREmergencyDumpPath to specify the path for JFR emergency dump.

      Problem

      JFR will dump the recording to the file as hs_err_pid.jfr if JVM encountered fatal errors (e.g. crash). It will be dumped to current directory, and we cannot specify dump path.

      In other dumps (hs_err log, heap dump, replay & inline data for JIT) can be specified it.

      Solution

      Introduce -XX:JFREmergencyDumpPath to specify the path for JFR emergency dump. If the user specifies it, JFR would create emergency dump into it.

      Specification

      diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
      index 72ce214b8bf..0597ef3b4d9 100644
      --- a/src/hotspot/share/runtime/globals.hpp
      +++ b/src/hotspot/share/runtime/globals.hpp
      @@ -2035,6 +2035,11 @@ const intx ObjectAlignmentInBytes = 8;
         JFR_ONLY(product(ccstr, StartFlightRecording, NULL,                       \
                 "Start flight recording with options"))                           \
                                                                                   \
      +  JFR_ONLY(product(ccstr, JFREmergencyDumpPath, NULL,                       \
      +          "The path for JFR emergency dump. "                               \
      +          "Flight record will be dumped there "                             \
      +          "when the error (OOM, stack overflow, crash) happens."))          \
      +                                                                            \
         product(bool, UseFastUnorderedTimeStamps, false, EXPERIMENTAL,            \
                 "Use platform unstable time where supported for timestamps only") \
                                                                                   \

            ysuenaga Yasumasa Suenaga
            ysuenaga Yasumasa Suenaga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: