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

Move out platform-dependent flags from globals.hpp

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • hotspot
    • None
    • behavioral
    • low
    • Hide
      Few options will be available only if the OS is Windows.
      Show
      Few options will be available only if the OS is Windows.
    • add/remove/modify command line option
    • JDK

      Summary

      Move some platform-dependent(Windows) options from globals.hpp to globals_windows.hpp.

      Problem

      Some flags should not be placed in the shared globals.hpp, they should be available only when the system is Windows.

      Solution

      Just move these options to globals_windows.hpp.

      Specification

      diff --git a/src/hotspot/os/windows/globals_windows.hpp b/src/hotspot/os/windows/globals_windows.hpp
      index 7ddf3c9131b..c6b67580237 100644
      --- a/src/hotspot/os/windows/globals_windows.hpp
      +++ b/src/hotspot/os/windows/globals_windows.hpp
      @@ -37,7 +37,18 @@
                                constraint)                                      \
                                                                                 \
       product(bool, UseOSErrorReporting, false,                                 \
      -        "Let VM fatal error propagate to the OS (ie. WER on Windows)")
      +        "Let VM fatal error propagate to the OS (ie. WER on Windows)")    \
      +                                                                          \
      +product(bool, ForceTimeHighResolution, false,                             \
      +        "Using high time resolution (for Win32 only)")                    \
      +                                                                          \
      +product(bool, PerfBypassFileSystemCheck, false,                           \
      +        "Bypass Win32 file system criteria checks (Windows Only)")        \
      +                                                                          \
      
      diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
      index 7d9ebe5f18a..934a4c02dea 100644
      --- a/src/hotspot/share/runtime/globals.hpp
      +++ b/src/hotspot/share/runtime/globals.hpp
      @@ -246,9 +246,6 @@ const intx ObjectAlignmentInBytes = 8;
                 "Use large pages if maximum heap is at least this big")           \
                 range(0, max_uintx)                                               \
                                                                                   \
      -  product(bool, ForceTimeHighResolution, false,                             \
      -          "Using high time resolution (for Win32 only)")                    \
      -                                                                            \
         develop(bool, TracePcPatching, false,                                     \
                 "Trace usage of frame::patch_pc")                                 \
                                                                                   \
      @@ -1842,14 +1839,6 @@ const intx ObjectAlignmentInBytes = 8;
         product(bool, PerfAllowAtExitRegistration, false,                         \
                 "Allow registration of atexit() methods")                         \
                                                                                   \
      -  product(bool, PerfBypassFileSystemCheck, false,                           \
      -          "Bypass Win32 file system criteria checks (Windows Only)")        \
      -                                                                            \

            yyang Yi Yang
            yyang Yi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: