< prev index next > src/hotspot/share/runtime/sharedRuntime.hpp
Print this page
#include "utilities/macros.hpp"
class AdapterHandlerEntry;
class AdapterFingerPrint;
class vframeStream;
+ class MetaspaceClosure;
// Runtime is the base class for various runtime interfaces
// (InterpreterRuntime, CompilerRuntime, etc.). It provides
// shared functionality such as exception forwarding (C++ to
// Java exceptions), locking/unlocking mechanisms, statistical
assert(_cont_doYield_stub != nullptr, "oops");
return _cont_doYield_stub;
}
// Implicit exceptions
- static address throw_AbstractMethodError_entry() { return _throw_AbstractMethodError_blob->entry_point(); }
- static address throw_IncompatibleClassChangeError_entry() { return _throw_IncompatibleClassChangeError_blob->entry_point(); }
- static address throw_NullPointerException_at_call_entry() { return _throw_NullPointerException_at_call_blob->entry_point(); }
- static address throw_StackOverflowError_entry() { return _throw_StackOverflowError_blob->entry_point(); }
- static address throw_delayed_StackOverflowError_entry() { return _throw_delayed_StackOverflowError_blob->entry_point(); }
+ static address throw_AbstractMethodError_entry() {
+ assert(_throw_AbstractMethodError_blob != nullptr, "");
+ return _throw_AbstractMethodError_blob->entry_point();
+ }
+ static address throw_IncompatibleClassChangeError_entry() {
+ assert(_throw_IncompatibleClassChangeError_blob != nullptr, "");
+ return _throw_IncompatibleClassChangeError_blob->entry_point();
+ }
+ static address throw_NullPointerException_at_call_entry() {
+ assert(_throw_NullPointerException_at_call_blob != nullptr, "");
+ return _throw_NullPointerException_at_call_blob->entry_point();
+ }
+ static address throw_StackOverflowError_entry() {
+ assert(_throw_StackOverflowError_blob != nullptr, "");
+ return _throw_StackOverflowError_blob->entry_point();
+ }
+ static address throw_delayed_StackOverflowError_entry() {
+ assert(_throw_delayed_StackOverflowError_blob != nullptr, "");
+ return _throw_delayed_StackOverflowError_blob->entry_point();
+ }
#if INCLUDE_JFR
- static address jfr_write_checkpoint() { return _jfr_write_checkpoint_blob->entry_point(); }
- static address jfr_return_lease() { return _jfr_return_lease_blob->entry_point(); }
+ static address jfr_write_checkpoint() {
+ assert(_jfr_write_checkpoint_blob != nullptr, "");
+ return _jfr_write_checkpoint_blob->entry_point();
+ }
+ static address jfr_return_lease() {
+ assert(_jfr_return_lease_blob != nullptr, "");
+ return _jfr_return_lease_blob->entry_point();
+ }
#endif
// Counters
#ifndef PRODUCT
static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
static address handle_wrong_method_abstract(JavaThread* current);
static address handle_wrong_method_ic_miss(JavaThread* current);
static address handle_unsafe_access(JavaThread* thread, address next_pc);
+ private:
+ static PerfTickCounters* _perf_resolve_opt_virtual_total_time;
+ static PerfTickCounters* _perf_resolve_virtual_total_time;
+ static PerfTickCounters* _perf_resolve_static_total_time;
+ static PerfTickCounters* _perf_handle_wrong_method_total_time;
+ static PerfTickCounters* _perf_ic_miss_total_time;
+ public:
+ static uint _ic_miss_ctr; // total # of IC misses
+ static uint _wrong_method_ctr;
+ static uint _resolve_static_ctr;
+ static uint _resolve_virtual_ctr;
+ static uint _resolve_opt_virtual_ctr;
+
+ static void print_counters_on(outputStream* st);
+
#ifndef PRODUCT
// Collect and print inline cache miss statistics
private:
enum { maxICmiss_count = 100 };
static int _ICmiss_count[maxICmiss_count]; // miss counts
static address _ICmiss_at[maxICmiss_count]; // miss addresses
static void trace_ic_miss(address at);
public:
- static uint _ic_miss_ctr; // total # of IC misses
- static uint _wrong_method_ctr;
- static uint _resolve_static_ctr;
- static uint _resolve_virtual_ctr;
- static uint _resolve_opt_virtual_ctr;
static uint _implicit_null_throws;
static uint _implicit_div0_throws;
static uint _jbyte_array_copy_ctr; // Slow-path byte array copy
static uint _jshort_array_copy_ctr; // Slow-path short array copy
static address nof_inlined_calls_addr() { return (address)&_nof_inlined_calls; }
static address nof_static_calls_addr() { return (address)&_nof_static_calls; }
static address nof_inlined_static_calls_addr() { return (address)&_nof_inlined_static_calls; }
static address nof_interface_calls_addr() { return (address)&_nof_interface_calls; }
static address nof_inlined_interface_calls_addr() { return (address)&_nof_inlined_interface_calls; }
- static void print_call_statistics(uint64_t comp_total);
- static void print_ic_miss_histogram();
+ static void print_call_statistics_on(outputStream* st);
+ static void print_ic_miss_histogram_on(outputStream* st);
#endif // PRODUCT
static void print_statistics() PRODUCT_RETURN;
};
// Allocate on CHeap instead of metaspace (see JDK-8331086).
// Dummy argument is used to avoid C++ warning about using
// deleted opearator MetaspaceObj::delete().
void* operator new(size_t size, size_t dummy) throw() {
+ assert(size == BytesPerWord * heap_word_size(sizeof(AdapterHandlerEntry)), "should match");
void* p = AllocateHeap(size, mtCode);
memset(p, 0, size);
return p;
}
static void print_handler_on(outputStream* st, const CodeBlob* b);
static bool contains(const CodeBlob* b);
static const char* name(AdapterFingerPrint* fingerprint);
static uint32_t id(AdapterFingerPrint* fingerprint);
#ifndef PRODUCT
- static void print_statistics();
+ static void print_statistics_on(outputStream* st);
#endif // PRODUCT
static bool is_abstract_method_adapter(AdapterHandlerEntry* adapter);
static AdapterBlob* link_aot_adapter_handler(AdapterHandlerEntry* handler) NOT_CDS_RETURN_(nullptr);
< prev index next >