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

src/share/vm/compiler/abstractCompiler.hpp

Print this page
rev 8995 : 8046155: JEP165: Compiler Control
Summary:
Reviewed-by:


  78   // be used to prohibit the compilers to use an intrinsic. There are three ways to
  79   // disable an intrinsic using the DisableIntrinsic flag:
  80   //
  81   // (1) -XX:DisableIntrinsic=_hashCode,_getClass
  82   //     Disables intrinsification of _hashCode and _getClass globally
  83   //     (i.e., the intrinsified version the methods will not be used at all).
  84   // (2) -XX:CompileCommand=option,aClass::aMethod,ccstr,DisableIntrinsic,_hashCode
  85   //     Disables intrinsification of _hashCode if it is called from
  86   //     aClass::aMethod (but not for any other call site of _hashCode)
  87   // (3) -XX:CompileCommand=option,java.lang.ref.Reference::get,ccstr,DisableIntrinsic,_Reference_get
  88   //     Some methods are not compiled by C2. Instead, the C2 compiler
  89   //     returns directly the intrinsified version of these methods.
  90   //     The command above forces C2 to compile _Reference_get, but
  91   //     allows using the intrinsified version of _Reference_get at all
  92   //     other call sites.
  93   //
  94   // From the modes above, (1) disable intrinsics globally, (2) and (3)
  95   // disable intrinsics on a per-method basis. In cases (2) and (3) the
  96   // compilation context is aClass::aMethod and java.lang.ref.Reference::get,
  97   // respectively.
  98   virtual bool is_intrinsic_available(methodHandle method, methodHandle compilation_context) {
  99     return is_intrinsic_supported(method) &&
 100            !vmIntrinsics::is_disabled_by_flags(method, compilation_context);

 101   }
 102 
 103   // Determines if an intrinsic is supported by the compiler, that is,
 104   // the compiler provides the instructions necessary to generate
 105   // the intrinsic code for method 'method'.
 106   //
 107   // The 'is_intrinsic_supported' method is a white list, that is,
 108   // by default no intrinsics are supported by a compiler except
 109   // the ones listed in the method. Overriding methods should conform
 110   // to this behavior.
 111   virtual bool is_intrinsic_supported(methodHandle method) {
 112     return false;
 113   }
 114 
 115   // Compiler type queries.
 116   bool is_c1()                                   { return _type == c1; }
 117   bool is_c2()                                   { return _type == c2; }
 118   bool is_shark()                                { return _type == shark; }
 119 
 120   // Customization




  78   // be used to prohibit the compilers to use an intrinsic. There are three ways to
  79   // disable an intrinsic using the DisableIntrinsic flag:
  80   //
  81   // (1) -XX:DisableIntrinsic=_hashCode,_getClass
  82   //     Disables intrinsification of _hashCode and _getClass globally
  83   //     (i.e., the intrinsified version the methods will not be used at all).
  84   // (2) -XX:CompileCommand=option,aClass::aMethod,ccstr,DisableIntrinsic,_hashCode
  85   //     Disables intrinsification of _hashCode if it is called from
  86   //     aClass::aMethod (but not for any other call site of _hashCode)
  87   // (3) -XX:CompileCommand=option,java.lang.ref.Reference::get,ccstr,DisableIntrinsic,_Reference_get
  88   //     Some methods are not compiled by C2. Instead, the C2 compiler
  89   //     returns directly the intrinsified version of these methods.
  90   //     The command above forces C2 to compile _Reference_get, but
  91   //     allows using the intrinsified version of _Reference_get at all
  92   //     other call sites.
  93   //
  94   // From the modes above, (1) disable intrinsics globally, (2) and (3)
  95   // disable intrinsics on a per-method basis. In cases (2) and (3) the
  96   // compilation context is aClass::aMethod and java.lang.ref.Reference::get,
  97   // respectively.
  98   virtual bool is_intrinsic_available(methodHandle method, DirectiveSet* dirset) {
  99     return is_intrinsic_supported(method) &&
 100            dirset->is_intrinsic_disabled(method) &&
 101            !vmIntrinsics::is_disabled_by_flags(method);
 102   }
 103 
 104   // Determines if an intrinsic is supported by the compiler, that is,
 105   // the compiler provides the instructions necessary to generate
 106   // the intrinsic code for method 'method'.
 107   //
 108   // The 'is_intrinsic_supported' method is a white list, that is,
 109   // by default no intrinsics are supported by a compiler except
 110   // the ones listed in the method. Overriding methods should conform
 111   // to this behavior.
 112   virtual bool is_intrinsic_supported(methodHandle method) {
 113     return false;
 114   }
 115 
 116   // Compiler type queries.
 117   bool is_c1()                                   { return _type == c1; }
 118   bool is_c2()                                   { return _type == c2; }
 119   bool is_shark()                                { return _type == shark; }
 120 
 121   // Customization


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