src/share/vm/compiler/compilerDirectives.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8138651 Sdiff src/share/vm/compiler

src/share/vm/compiler/compilerDirectives.hpp

Print this page




  30 #include "ci/ciUtilities.hpp"
  31 #include "compiler/methodMatcher.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "utilities/exceptions.hpp"
  35 
  36   //      Directives flag name,    type, default value, compile command name
  37   #define compilerdirectives_common_flags(cflags) \
  38     cflags(Enable,                  bool, false, X) \
  39     cflags(Exclude,                 bool, false, X) \
  40     cflags(BreakAtExecute,          bool, false, X) \
  41     cflags(BreakAtCompile,          bool, false, X) \
  42     cflags(Log,                     bool, false, X) \
  43     cflags(PrintAssembly,           bool, PrintAssembly, PrintAssembly) \
  44     cflags(PrintInlining,           bool, PrintInlining, PrintInlining) \
  45     cflags(PrintNMethods,           bool, PrintNMethods, PrintNMethods) \
  46     cflags(ReplayInline,            bool, false, ReplayInline) \
  47     cflags(DumpReplay,              bool, false, DumpReplay) \
  48     cflags(DumpInline,              bool, false, DumpInline) \
  49     cflags(CompilerDirectivesIgnoreCompileCommands, bool, CompilerDirectivesIgnoreCompileCommands, X) \
  50     cflags(DisableIntrinsic,        ccstr, DisableIntrinsic, DisableIntrinsic)
  51 
  52 #ifdef COMPILER1
  53   #define compilerdirectives_c1_flags(cflags)
  54 #else
  55   #define compilerdirectives_c1_flags(cflags)
  56 #endif
  57 
  58 #ifdef COMPILER2
  59   #define compilerdirectives_c2_flags(cflags) \
  60     cflags(BlockLayoutByFrequency,  bool, BlockLayoutByFrequency,  BlockLayoutByFrequency) \
  61     cflags(PrintOptoAssembly,       bool, PrintOptoAssembly, PrintOptoAssembly) \
  62     cflags(PrintIntrinsics,         bool, PrintIntrinsics, PrintIntrinsics) \
  63     cflags(TraceOptoPipelining,     bool, false, TraceOptoPipelining) \
  64     cflags(TraceOptoOutput,         bool, false, TraceOptoOutput) \
  65     cflags(TraceSpilling,           bool, TraceSpilling, TraceSpilling) \
  66     cflags(Vectorize,               bool, false, Vectorize) \
  67     cflags(VectorizeDebug,          bool, false, VectorizeDebug) \
  68     cflags(CloneMapDebug,           bool, false, CloneMapDebug) \
  69     cflags(DoReserveCopyInSuperWordDebug, bool, false, DoReserveCopyInSuperWordDebug) \
  70     cflags(IGVPrintLevel,           intx, PrintIdealGraphLevel, IGVPrintLevel) \


 124     number_of_flags
 125   } flags;
 126 
 127   bool _modified[number_of_flags];
 128 
 129 #define flag_store_definition(name, type, dvalue, cc_flag) type name##Option;
 130   compilerdirectives_common_flags(flag_store_definition)
 131   compilerdirectives_c2_flags(flag_store_definition)
 132   compilerdirectives_c1_flags(flag_store_definition)
 133 
 134 // Casting to get the same function signature for all setters. Used from parser.
 135 #define set_function_definition(name, type, dvalue, cc_flag) void set_##name(void* value) { type val = *(type*)value; name##Option = val; _modified[name##Index] = 1; }
 136   compilerdirectives_common_flags(set_function_definition)
 137   compilerdirectives_c2_flags(set_function_definition)
 138   compilerdirectives_c1_flags(set_function_definition)
 139 
 140   void print_intx(outputStream* st, ccstr n, intx v, bool mod) { if (mod) { st->print("%s:" INTX_FORMAT " ", n, v); } }
 141   void print_bool(outputStream* st, ccstr n, bool v, bool mod) { if (mod) { st->print("%s:%s ", n, v ? "true" : "false"); } }
 142   void print_double(outputStream* st, ccstr n, double v, bool mod) { if (mod) { st->print("%s:%f ", n, v); } }
 143   void print_ccstr(outputStream* st, ccstr n, ccstr v, bool mod) { if (mod) { st->print("%s:%s ", n, v); } }

 144 
 145 void print(outputStream* st) {
 146     print_inline(st);
 147     st->print("  ");
 148 #define print_function_definition(name, type, dvalue, cc_flag) print_##type(st, #name, this->name##Option, true);//(bool)_modified[name##Index]);
 149     compilerdirectives_common_flags(print_function_definition)
 150     compilerdirectives_c2_flags(print_function_definition)
 151     compilerdirectives_c1_flags(print_function_definition)
 152     st->cr();
 153   }
 154 };
 155 
 156 class CompilerDirectives : public CHeapObj<mtCompiler> {
 157 private:
 158   CompilerDirectives* _next;
 159   BasicMatcher* _match;
 160   int _ref_count;
 161 
 162 public:
 163 




  30 #include "ci/ciUtilities.hpp"
  31 #include "compiler/methodMatcher.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "utilities/exceptions.hpp"
  35 
  36   //      Directives flag name,    type, default value, compile command name
  37   #define compilerdirectives_common_flags(cflags) \
  38     cflags(Enable,                  bool, false, X) \
  39     cflags(Exclude,                 bool, false, X) \
  40     cflags(BreakAtExecute,          bool, false, X) \
  41     cflags(BreakAtCompile,          bool, false, X) \
  42     cflags(Log,                     bool, false, X) \
  43     cflags(PrintAssembly,           bool, PrintAssembly, PrintAssembly) \
  44     cflags(PrintInlining,           bool, PrintInlining, PrintInlining) \
  45     cflags(PrintNMethods,           bool, PrintNMethods, PrintNMethods) \
  46     cflags(ReplayInline,            bool, false, ReplayInline) \
  47     cflags(DumpReplay,              bool, false, DumpReplay) \
  48     cflags(DumpInline,              bool, false, DumpInline) \
  49     cflags(CompilerDirectivesIgnoreCompileCommands, bool, CompilerDirectivesIgnoreCompileCommands, X) \
  50     cflags(DisableIntrinsic,        ccstrlist, DisableIntrinsic, DisableIntrinsic)
  51 
  52 #ifdef COMPILER1
  53   #define compilerdirectives_c1_flags(cflags)
  54 #else
  55   #define compilerdirectives_c1_flags(cflags)
  56 #endif
  57 
  58 #ifdef COMPILER2
  59   #define compilerdirectives_c2_flags(cflags) \
  60     cflags(BlockLayoutByFrequency,  bool, BlockLayoutByFrequency,  BlockLayoutByFrequency) \
  61     cflags(PrintOptoAssembly,       bool, PrintOptoAssembly, PrintOptoAssembly) \
  62     cflags(PrintIntrinsics,         bool, PrintIntrinsics, PrintIntrinsics) \
  63     cflags(TraceOptoPipelining,     bool, false, TraceOptoPipelining) \
  64     cflags(TraceOptoOutput,         bool, false, TraceOptoOutput) \
  65     cflags(TraceSpilling,           bool, TraceSpilling, TraceSpilling) \
  66     cflags(Vectorize,               bool, false, Vectorize) \
  67     cflags(VectorizeDebug,          bool, false, VectorizeDebug) \
  68     cflags(CloneMapDebug,           bool, false, CloneMapDebug) \
  69     cflags(DoReserveCopyInSuperWordDebug, bool, false, DoReserveCopyInSuperWordDebug) \
  70     cflags(IGVPrintLevel,           intx, PrintIdealGraphLevel, IGVPrintLevel) \


 124     number_of_flags
 125   } flags;
 126 
 127   bool _modified[number_of_flags];
 128 
 129 #define flag_store_definition(name, type, dvalue, cc_flag) type name##Option;
 130   compilerdirectives_common_flags(flag_store_definition)
 131   compilerdirectives_c2_flags(flag_store_definition)
 132   compilerdirectives_c1_flags(flag_store_definition)
 133 
 134 // Casting to get the same function signature for all setters. Used from parser.
 135 #define set_function_definition(name, type, dvalue, cc_flag) void set_##name(void* value) { type val = *(type*)value; name##Option = val; _modified[name##Index] = 1; }
 136   compilerdirectives_common_flags(set_function_definition)
 137   compilerdirectives_c2_flags(set_function_definition)
 138   compilerdirectives_c1_flags(set_function_definition)
 139 
 140   void print_intx(outputStream* st, ccstr n, intx v, bool mod) { if (mod) { st->print("%s:" INTX_FORMAT " ", n, v); } }
 141   void print_bool(outputStream* st, ccstr n, bool v, bool mod) { if (mod) { st->print("%s:%s ", n, v ? "true" : "false"); } }
 142   void print_double(outputStream* st, ccstr n, double v, bool mod) { if (mod) { st->print("%s:%f ", n, v); } }
 143   void print_ccstr(outputStream* st, ccstr n, ccstr v, bool mod) { if (mod) { st->print("%s:%s ", n, v); } }
 144   void print_ccstrlist(outputStream* st, ccstr n, ccstr v, bool mod) { print_ccstr(st, n, v, mod); }
 145 
 146 void print(outputStream* st) {
 147     print_inline(st);
 148     st->print("  ");
 149 #define print_function_definition(name, type, dvalue, cc_flag) print_##type(st, #name, this->name##Option, true);//(bool)_modified[name##Index]);
 150     compilerdirectives_common_flags(print_function_definition)
 151     compilerdirectives_c2_flags(print_function_definition)
 152     compilerdirectives_c1_flags(print_function_definition)
 153     st->cr();
 154   }
 155 };
 156 
 157 class CompilerDirectives : public CHeapObj<mtCompiler> {
 158 private:
 159   CompilerDirectives* _next;
 160   BasicMatcher* _match;
 161   int _ref_count;
 162 
 163 public:
 164 


src/share/vm/compiler/compilerDirectives.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File