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

Make more compiler related flags available on a per method level

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 12, 13, 14, 15
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      There are currently only a few compiler related flags available to be used for a specific method only (and not by default for all compiled methods):

      Defined in compilerDirectives.hpp:
        #define compilerdirectives_common_flags(cflags) \
          cflags(Enable, bool, false, X) \
          cflags(Exclude, bool, false, X) \
          cflags(BreakAtExecute, bool, false, X) \
          cflags(BreakAtCompile, bool, false, X) \
          cflags(Log, bool, LogCompilation, X) \
          cflags(PrintAssembly, bool, PrintAssembly, PrintAssembly) \
          cflags(PrintInlining, bool, PrintInlining, PrintInlining) \
          cflags(PrintNMethods, bool, PrintNMethods, PrintNMethods) \
          cflags(BackgroundCompilation, bool, BackgroundCompilation, BackgroundCompilation) \
          cflags(ReplayInline, bool, false, ReplayInline) \
          cflags(DumpReplay, bool, false, DumpReplay) \
          cflags(DumpInline, bool, false, DumpInline) \
          cflags(CompilerDirectivesIgnoreCompileCommands, bool, CompilerDirectivesIgnoreCompileCommands, X) \
          cflags(DisableIntrinsic, ccstrlist, DisableIntrinsic, DisableIntrinsic)

      #ifdef COMPILER1
        #define compilerdirectives_c1_flags(cflags)
      #else
        #define compilerdirectives_c1_flags(cflags)
      #endif

      #ifdef COMPILER2
        #define compilerdirectives_c2_flags(cflags) \
          cflags(BlockLayoutByFrequency, bool, BlockLayoutByFrequency, BlockLayoutByFrequency) \
          cflags(PrintOptoAssembly, bool, PrintOptoAssembly, PrintOptoAssembly) \
          cflags(PrintIntrinsics, bool, PrintIntrinsics, PrintIntrinsics) \
      NOT_PRODUCT(cflags(TraceOptoPipelining, bool, TraceOptoPipelining, TraceOptoPipelining)) \
      NOT_PRODUCT(cflags(TraceOptoOutput, bool, TraceOptoOutput, TraceOptoOutput)) \
      NOT_PRODUCT(cflags(PrintIdeal, bool, PrintIdeal, PrintIdeal)) \
      NOT_PRODUCT(cflags(IGVPrintLevel, intx, PrintIdealGraphLevel, IGVPrintLevel)) \
          cflags(TraceSpilling, bool, TraceSpilling, TraceSpilling) \
          cflags(Vectorize, bool, false, Vectorize) \
          cflags(VectorizeDebug, uintx, 0, VectorizeDebug) \
          cflags(CloneMapDebug, bool, false, CloneMapDebug) \
          cflags(MaxNodeLimit, intx, MaxNodeLimit, MaxNodeLimit)
      #else
        #define compilerdirectives_c2_flags(cflags)
      #endif

      We should add more flags to these lists. Especially for debug builds, it would be beneficial to allow any compiler related flag to be used on a per method level to improve debugging.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xliu Xin Liu
              Reporter:
              chagedorn Christian Hagedorn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: