< prev index next >

src/hotspot/share/runtime/tieredThresholdPolicy.cpp

Print this page




 364 
 365   return max_task;
 366 }
 367 
 368 void TieredThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {
 369   for (ScopeDesc* sd = trap_scope;; sd = sd->sender()) {
 370     if (PrintTieredEvents) {
 371       methodHandle mh(sd->method());
 372       print_event(REPROFILE, mh, mh, InvocationEntryBci, CompLevel_none);
 373     }
 374     MethodData* mdo = sd->method()->method_data();
 375     if (mdo != NULL) {
 376       mdo->reset_start_counters();
 377     }
 378     if (sd->is_top()) break;
 379   }
 380 }
 381 
 382 nmethod* TieredThresholdPolicy::event(const methodHandle& method, const methodHandle& inlinee,
 383                                       int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread) {
 384   if (comp_level == CompLevel_none &&
 385       JvmtiExport::can_post_interpreter_events() &&
 386       thread->is_interp_only_mode()) {
 387     return NULL;
 388   }
 389   if (CompileTheWorld || ReplayCompiles) {
 390     // Don't trigger other compiles in testing mode
 391     return NULL;
 392   }
 393 
 394   handle_counter_overflow(method());
 395   if (method() != inlinee()) {
 396     handle_counter_overflow(inlinee());
 397   }
 398 
 399   if (PrintTieredEvents) {
 400     print_event(bci == InvocationEntryBci ? CALL : LOOP, method, inlinee, bci, comp_level);
 401   }
 402 
 403   if (bci == InvocationEntryBci) {
 404     method_invocation_event(method, inlinee, comp_level, nm, thread);
 405   } else {




 364 
 365   return max_task;
 366 }
 367 
 368 void TieredThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {
 369   for (ScopeDesc* sd = trap_scope;; sd = sd->sender()) {
 370     if (PrintTieredEvents) {
 371       methodHandle mh(sd->method());
 372       print_event(REPROFILE, mh, mh, InvocationEntryBci, CompLevel_none);
 373     }
 374     MethodData* mdo = sd->method()->method_data();
 375     if (mdo != NULL) {
 376       mdo->reset_start_counters();
 377     }
 378     if (sd->is_top()) break;
 379   }
 380 }
 381 
 382 nmethod* TieredThresholdPolicy::event(const methodHandle& method, const methodHandle& inlinee,
 383                                       int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread) {
 384   if (JvmtiExport::can_post_interpreter_events() &&

 385       thread->is_interp_only_mode()) {
 386     return NULL;
 387   }
 388   if (CompileTheWorld || ReplayCompiles) {
 389     // Don't trigger other compiles in testing mode
 390     return NULL;
 391   }
 392 
 393   handle_counter_overflow(method());
 394   if (method() != inlinee()) {
 395     handle_counter_overflow(inlinee());
 396   }
 397 
 398   if (PrintTieredEvents) {
 399     print_event(bci == InvocationEntryBci ? CALL : LOOP, method, inlinee, bci, comp_level);
 400   }
 401 
 402   if (bci == InvocationEntryBci) {
 403     method_invocation_event(method, inlinee, comp_level, nm, thread);
 404   } else {


< prev index next >