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

src/share/vm/c1/c1_Compilation.hpp

Print this page
rev 5462 : 8026251: New type profiling points: parameters to methods
Summary: x86 interpreter and c1 type profiling for parameters on method entries
Reviewed-by:


 221   }
 222   bool count_invocations() { return is_profiling(); }
 223   bool count_backedges()   { return is_profiling(); }
 224 
 225   // Helpers for generation of profile information
 226   bool profile_branches() {
 227     return env()->comp_level() == CompLevel_full_profile &&
 228       C1UpdateMethodData && C1ProfileBranches;
 229   }
 230   bool profile_calls() {
 231     return env()->comp_level() == CompLevel_full_profile &&
 232       C1UpdateMethodData && C1ProfileCalls;
 233   }
 234   bool profile_inlined_calls() {
 235     return profile_calls() && C1ProfileInlinedCalls;
 236   }
 237   bool profile_checkcasts() {
 238     return env()->comp_level() == CompLevel_full_profile &&
 239       C1UpdateMethodData && C1ProfileCheckcasts;
 240   }
 241 











 242   // will compilation make optimistic assumptions that might lead to
 243   // deoptimization and that the runtime will account for?
 244   bool is_optimistic() const                             {
 245     return !TieredCompilation &&
 246       (RangeCheckElimination || UseLoopInvariantCodeMotion) &&
 247       method()->method_data()->trap_count(Deoptimization::Reason_none) == 0;
 248   }
 249 
 250   ciKlass* cha_exact_type(ciType* type);
 251 };
 252 
 253 
 254 // Macro definitions for unified bailout-support
 255 // The methods bailout() and bailed_out() are present in all classes
 256 // that might bailout, but forward all calls to Compilation
 257 #define BAILOUT(msg)               { bailout(msg); return;              }
 258 #define BAILOUT_(msg, res)         { bailout(msg); return res;          }
 259 
 260 #define CHECK_BAILOUT()            { if (bailed_out()) return;          }
 261 #define CHECK_BAILOUT_(res)        { if (bailed_out()) return res;      }




 221   }
 222   bool count_invocations() { return is_profiling(); }
 223   bool count_backedges()   { return is_profiling(); }
 224 
 225   // Helpers for generation of profile information
 226   bool profile_branches() {
 227     return env()->comp_level() == CompLevel_full_profile &&
 228       C1UpdateMethodData && C1ProfileBranches;
 229   }
 230   bool profile_calls() {
 231     return env()->comp_level() == CompLevel_full_profile &&
 232       C1UpdateMethodData && C1ProfileCalls;
 233   }
 234   bool profile_inlined_calls() {
 235     return profile_calls() && C1ProfileInlinedCalls;
 236   }
 237   bool profile_checkcasts() {
 238     return env()->comp_level() == CompLevel_full_profile &&
 239       C1UpdateMethodData && C1ProfileCheckcasts;
 240   }
 241   bool profile_parameters() {
 242     return env()->comp_level() == CompLevel_full_profile &&
 243       MethodData::profile_parameters();
 244   }
 245   bool profile_arguments() {
 246     return env()->comp_level() == CompLevel_full_profile &&
 247       MethodData::profile_arguments();
 248   }
 249   bool profile_return() {
 250     return env()->comp_level() == CompLevel_full_profile &&
 251       MethodData::profile_return();
 252   }
 253   // will compilation make optimistic assumptions that might lead to
 254   // deoptimization and that the runtime will account for?
 255   bool is_optimistic() const                             {
 256     return !TieredCompilation &&
 257       (RangeCheckElimination || UseLoopInvariantCodeMotion) &&
 258       method()->method_data()->trap_count(Deoptimization::Reason_none) == 0;
 259   }
 260 
 261   ciKlass* cha_exact_type(ciType* type);
 262 };
 263 
 264 
 265 // Macro definitions for unified bailout-support
 266 // The methods bailout() and bailed_out() are present in all classes
 267 // that might bailout, but forward all calls to Compilation
 268 #define BAILOUT(msg)               { bailout(msg); return;              }
 269 #define BAILOUT_(msg, res)         { bailout(msg); return res;          }
 270 
 271 #define CHECK_BAILOUT()            { if (bailed_out()) return;          }
 272 #define CHECK_BAILOUT_(res)        { if (bailed_out()) return res;      }


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