400 static uint per_method_trap_limit(int reason) {
401 return reason_is_speculate(reason) ? (uint)PerMethodSpecTrapLimit : (uint)PerMethodTrapLimit;
402 }
403
404 static const char* trap_reason_name(int reason);
405 static const char* trap_action_name(int action);
406 // Format like reason='foo' action='bar' index='123'.
407 // This is suitable both for XML and for tty output.
408 static const char* format_trap_request(char* buf, size_t buflen,
409 int trap_request);
410
411 static jint total_deoptimization_count();
412 static jint deoptimization_count(DeoptReason reason);
413
414 // JVMTI PopFrame support
415
416 // Preserves incoming arguments to the popped frame when it is
417 // returning to a deoptimized caller
418 static void popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address);
419
420 static MethodData* get_method_data(JavaThread* thread, methodHandle m, bool create_if_missing);
421 private:
422 // Update the mdo's count and per-BCI reason bits, returning previous state:
423 static ProfileData* query_update_method_data(MethodData* trap_mdo,
424 int trap_bci,
425 DeoptReason reason,
426 bool update_total_trap_count,
427 #if INCLUDE_JVMCI
428 bool is_osr,
429 #endif
430 Method* compiled_method,
431 //outputs:
432 uint& ret_this_trap_count,
433 bool& ret_maybe_prior_trap,
434 bool& ret_maybe_prior_recompile);
435 // class loading support for uncommon trap
436 static void load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS);
437 static void load_class_by_index(const constantPoolHandle& constant_pool, int index);
438
439 static UnrollBlock* fetch_unroll_info_helper(JavaThread* thread, int exec_mode);
440
|
400 static uint per_method_trap_limit(int reason) {
401 return reason_is_speculate(reason) ? (uint)PerMethodSpecTrapLimit : (uint)PerMethodTrapLimit;
402 }
403
404 static const char* trap_reason_name(int reason);
405 static const char* trap_action_name(int action);
406 // Format like reason='foo' action='bar' index='123'.
407 // This is suitable both for XML and for tty output.
408 static const char* format_trap_request(char* buf, size_t buflen,
409 int trap_request);
410
411 static jint total_deoptimization_count();
412 static jint deoptimization_count(DeoptReason reason);
413
414 // JVMTI PopFrame support
415
416 // Preserves incoming arguments to the popped frame when it is
417 // returning to a deoptimized caller
418 static void popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address);
419
420 static MethodData* get_method_data(JavaThread* thread, const methodHandle& m, bool create_if_missing);
421 private:
422 // Update the mdo's count and per-BCI reason bits, returning previous state:
423 static ProfileData* query_update_method_data(MethodData* trap_mdo,
424 int trap_bci,
425 DeoptReason reason,
426 bool update_total_trap_count,
427 #if INCLUDE_JVMCI
428 bool is_osr,
429 #endif
430 Method* compiled_method,
431 //outputs:
432 uint& ret_this_trap_count,
433 bool& ret_maybe_prior_trap,
434 bool& ret_maybe_prior_recompile);
435 // class loading support for uncommon trap
436 static void load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS);
437 static void load_class_by_index(const constantPoolHandle& constant_pool, int index);
438
439 static UnrollBlock* fetch_unroll_info_helper(JavaThread* thread, int exec_mode);
440
|