src/share/vm/interpreter/bytecodeInterpreter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8048721 Sdiff src/share/vm/interpreter

src/share/vm/interpreter/bytecodeInterpreter.cpp

Print this page




 313         if (ProfileInterpreter) {                                                                   \
 314           BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);                                   \
 315           /* Check for overflow against MDO count. */                                               \
 316           do_OSR = do_OSR                                                                           \
 317             && (mdo_last_branch_taken_count >= (uint)InvocationCounter::InterpreterBackwardBranchLimit)\
 318             /* When ProfileInterpreter is on, the backedge_count comes     */                       \
 319             /* from the methodDataOop, which value does not get reset on   */                       \
 320             /* the call to frequency_counter_overflow(). To avoid          */                       \
 321             /* excessive calls to the overflow routine while the method is */                       \
 322             /* being compiled, add a second test to make sure the overflow */                       \
 323             /* function is called only once every overflow_frequency.      */                       \
 324             && (!(mdo_last_branch_taken_count & 1023));                                             \
 325         } else {                                                                                    \
 326           /* check for overflow of backedge counter */                                              \
 327           do_OSR = do_OSR                                                                           \
 328             && mcs->invocation_counter()->reached_InvocationLimit(mcs->backedge_counter());         \
 329         }                                                                                           \
 330         if (do_OSR) {                                                                               \
 331           nmethod* osr_nmethod;                                                                     \
 332           OSR_REQUEST(osr_nmethod, branch_pc);                                                      \
 333           if (osr_nmethod != NULL && osr_nmethod->osr_entry_bci() != InvalidOSREntryBci) {          \
 334             intptr_t* buf;                                                                          \
 335             /* Call OSR migration with last java frame only, no checks. */                          \
 336             CALL_VM_NAKED_LJF(buf=SharedRuntime::OSR_migration_begin(THREAD));                      \
 337             istate->set_msg(do_osr);                                                                \
 338             istate->set_osr_buf((address)buf);                                                      \
 339             istate->set_osr_entry(osr_nmethod->osr_entry());                                        \
 340             return;                                                                                 \
 341           }                                                                                         \
 342         }                                                                                           \
 343       }  /* UseCompiler ... */                                                                      \
 344       SAFEPOINT;                                                                                    \
 345     }
 346 
 347 /*
 348  * For those opcodes that need to have a GC point on a backwards branch
 349  */
 350 
 351 /*
 352  * Macros for caching and flushing the interpreter state. Some local
 353  * variables need to be flushed out to the frame before we do certain




 313         if (ProfileInterpreter) {                                                                   \
 314           BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);                                   \
 315           /* Check for overflow against MDO count. */                                               \
 316           do_OSR = do_OSR                                                                           \
 317             && (mdo_last_branch_taken_count >= (uint)InvocationCounter::InterpreterBackwardBranchLimit)\
 318             /* When ProfileInterpreter is on, the backedge_count comes     */                       \
 319             /* from the methodDataOop, which value does not get reset on   */                       \
 320             /* the call to frequency_counter_overflow(). To avoid          */                       \
 321             /* excessive calls to the overflow routine while the method is */                       \
 322             /* being compiled, add a second test to make sure the overflow */                       \
 323             /* function is called only once every overflow_frequency.      */                       \
 324             && (!(mdo_last_branch_taken_count & 1023));                                             \
 325         } else {                                                                                    \
 326           /* check for overflow of backedge counter */                                              \
 327           do_OSR = do_OSR                                                                           \
 328             && mcs->invocation_counter()->reached_InvocationLimit(mcs->backedge_counter());         \
 329         }                                                                                           \
 330         if (do_OSR) {                                                                               \
 331           nmethod* osr_nmethod;                                                                     \
 332           OSR_REQUEST(osr_nmethod, branch_pc);                                                      \
 333           if (osr_nmethod != NULL && osr_nmethod->is_in_use()) {                                    \
 334             intptr_t* buf;                                                                          \
 335             /* Call OSR migration with last java frame only, no checks. */                          \
 336             CALL_VM_NAKED_LJF(buf=SharedRuntime::OSR_migration_begin(THREAD));                      \
 337             istate->set_msg(do_osr);                                                                \
 338             istate->set_osr_buf((address)buf);                                                      \
 339             istate->set_osr_entry(osr_nmethod->osr_entry());                                        \
 340             return;                                                                                 \
 341           }                                                                                         \
 342         }                                                                                           \
 343       }  /* UseCompiler ... */                                                                      \
 344       SAFEPOINT;                                                                                    \
 345     }
 346 
 347 /*
 348  * For those opcodes that need to have a GC point on a backwards branch
 349  */
 350 
 351 /*
 352  * Macros for caching and flushing the interpreter state. Some local
 353  * variables need to be flushed out to the frame before we do certain


src/share/vm/interpreter/bytecodeInterpreter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File