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

Make more compiler related flags available on a per method level


    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 11, 12, 13, 14, 15
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:


      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)
        #define compilerdirectives_c1_flags(cflags)

      #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)
        #define compilerdirectives_c2_flags(cflags)

      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.




            • Assignee:
              chagedorn Christian Hagedorn
              chagedorn Christian Hagedorn
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: