87 // Counters
88 static int64_t _nof_megamorphic_calls; // total # of megamorphic calls (through vtable)
89 #endif // !PRODUCT
90
91 private:
92 static SafepointBlob* generate_handler_blob(StubId id, address call_ptr);
93 static RuntimeStub* generate_resolve_blob(StubId id, address destination);
94 static RuntimeStub* generate_throw_exception(StubId id, address runtime_entry);
95 public:
96 static void generate_initial_stubs(void);
97 static void generate_stubs(void);
98 #if INCLUDE_JFR
99 static void generate_jfr_stubs(void);
100 // For c2: c_rarg0 is junk, call to runtime to write a checkpoint.
101 // It returns a jobject handle to the event writer.
102 // The handle is dereferenced and the return value is the event writer oop.
103 static RuntimeStub* generate_jfr_write_checkpoint();
104 // For c2: call to runtime to return a buffer lease.
105 static RuntimeStub* generate_jfr_return_lease();
106 #endif
107 static void init_adapter_library();
108
109 static const char *stub_name(StubId id) {
110 assert(StubInfo::is_shared(id), "not a shared stub %s", StubInfo::name(id));
111 return StubInfo::name(id);
112 }
113
114 // max bytes for each dtrace string parameter
115 enum { max_dtrace_string_size = 256 };
116
117 // The following arithmetic routines are used on platforms that do
118 // not have machine instructions to implement their functionality.
119 // Do not remove these.
120
121 // long arithmetics
122 static jlong lmul(jlong y, jlong x);
123 static jlong ldiv(jlong y, jlong x);
124 static jlong lrem(jlong y, jlong x);
125
126 // float and double remainder
290 }
291 static address throw_StackOverflowError_entry() {
292 assert(_throw_StackOverflowError_blob != nullptr, "");
293 return _throw_StackOverflowError_blob->entry_point();
294 }
295 static address throw_delayed_StackOverflowError_entry() {
296 assert(_throw_delayed_StackOverflowError_blob != nullptr, "");
297 return _throw_delayed_StackOverflowError_blob->entry_point();
298 }
299
300 #if INCLUDE_JFR
301 static address jfr_write_checkpoint() {
302 assert(_jfr_write_checkpoint_blob != nullptr, "");
303 return _jfr_write_checkpoint_blob->entry_point();
304 }
305 static address jfr_return_lease() {
306 assert(_jfr_return_lease_blob != nullptr, "");
307 return _jfr_return_lease_blob->entry_point();
308 }
309 #endif
310
311 // Counters
312 #ifndef PRODUCT
313 static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
314 #endif // PRODUCT
315
316 // Helper routine for full-speed JVMTI exception throwing support
317 static void throw_and_post_jvmti_exception(JavaThread* current, Handle h_exception);
318 static void throw_and_post_jvmti_exception(JavaThread* current, Symbol* name, const char *message = nullptr);
319
320 // RedefineClasses() tracing support for obsolete method entry
321 static int rc_trace_method_entry(JavaThread* thread, Method* m);
322
323 // To be used as the entry point for unresolved native methods.
324 static address native_method_throw_unsatisfied_link_error_entry();
325
326 static void register_finalizer(JavaThread* thread, oopDesc* obj);
327
328 // dtrace notifications
329 static int dtrace_object_alloc(oopDesc* o);
|
87 // Counters
88 static int64_t _nof_megamorphic_calls; // total # of megamorphic calls (through vtable)
89 #endif // !PRODUCT
90
91 private:
92 static SafepointBlob* generate_handler_blob(StubId id, address call_ptr);
93 static RuntimeStub* generate_resolve_blob(StubId id, address destination);
94 static RuntimeStub* generate_throw_exception(StubId id, address runtime_entry);
95 public:
96 static void generate_initial_stubs(void);
97 static void generate_stubs(void);
98 #if INCLUDE_JFR
99 static void generate_jfr_stubs(void);
100 // For c2: c_rarg0 is junk, call to runtime to write a checkpoint.
101 // It returns a jobject handle to the event writer.
102 // The handle is dereferenced and the return value is the event writer oop.
103 static RuntimeStub* generate_jfr_write_checkpoint();
104 // For c2: call to runtime to return a buffer lease.
105 static RuntimeStub* generate_jfr_return_lease();
106 #endif
107 static RuntimeStub* generate_shenandoah_stub(StubId stub_id);
108
109 static void init_adapter_library();
110
111 static const char *stub_name(StubId id) {
112 assert(StubInfo::is_shared(id), "not a shared stub %s", StubInfo::name(id));
113 return StubInfo::name(id);
114 }
115
116 // max bytes for each dtrace string parameter
117 enum { max_dtrace_string_size = 256 };
118
119 // The following arithmetic routines are used on platforms that do
120 // not have machine instructions to implement their functionality.
121 // Do not remove these.
122
123 // long arithmetics
124 static jlong lmul(jlong y, jlong x);
125 static jlong ldiv(jlong y, jlong x);
126 static jlong lrem(jlong y, jlong x);
127
128 // float and double remainder
292 }
293 static address throw_StackOverflowError_entry() {
294 assert(_throw_StackOverflowError_blob != nullptr, "");
295 return _throw_StackOverflowError_blob->entry_point();
296 }
297 static address throw_delayed_StackOverflowError_entry() {
298 assert(_throw_delayed_StackOverflowError_blob != nullptr, "");
299 return _throw_delayed_StackOverflowError_blob->entry_point();
300 }
301
302 #if INCLUDE_JFR
303 static address jfr_write_checkpoint() {
304 assert(_jfr_write_checkpoint_blob != nullptr, "");
305 return _jfr_write_checkpoint_blob->entry_point();
306 }
307 static address jfr_return_lease() {
308 assert(_jfr_return_lease_blob != nullptr, "");
309 return _jfr_return_lease_blob->entry_point();
310 }
311 #endif
312 static address shenandoah_keepalive() {
313 assert(_shenandoah_keepalive_blob != nullptr, "");
314 return _shenandoah_keepalive_blob->entry_point();
315 }
316
317 static address shenandoah_lrb_strong() {
318 assert(_shenandoah_lrb_strong_blob != nullptr, "");
319 return _shenandoah_lrb_strong_blob->entry_point();
320 }
321
322 static address shenandoah_lrb_weak() {
323 assert(_shenandoah_lrb_weak_blob != nullptr, "");
324 return _shenandoah_lrb_weak_blob->entry_point();
325 }
326
327 static address shenandoah_lrb_phantom() {
328 assert(_shenandoah_lrb_phantom_narrow_blob != nullptr, "");
329 return _shenandoah_lrb_phantom_narrow_blob->entry_point();
330 }
331
332 static address shenandoah_lrb_strong_narrow() {
333 assert(_shenandoah_lrb_strong_narrow_blob != nullptr, "");
334 return _shenandoah_lrb_strong_narrow_blob->entry_point();
335 }
336
337 static address shenandoah_lrb_weak_narrow() {
338 assert(_shenandoah_lrb_weak_narrow_blob != nullptr, "");
339 return _shenandoah_lrb_weak_narrow_blob->entry_point();
340 }
341
342 static address shenandoah_lrb_phantom_narrow() {
343 assert(_shenandoah_lrb_phantom_narrow_blob != nullptr, "");
344 return _shenandoah_lrb_phantom_narrow_blob->entry_point();
345 }
346
347
348 // Counters
349 #ifndef PRODUCT
350 static address nof_megamorphic_calls_addr() { return (address)&_nof_megamorphic_calls; }
351 #endif // PRODUCT
352
353 // Helper routine for full-speed JVMTI exception throwing support
354 static void throw_and_post_jvmti_exception(JavaThread* current, Handle h_exception);
355 static void throw_and_post_jvmti_exception(JavaThread* current, Symbol* name, const char *message = nullptr);
356
357 // RedefineClasses() tracing support for obsolete method entry
358 static int rc_trace_method_entry(JavaThread* thread, Method* m);
359
360 // To be used as the entry point for unresolved native methods.
361 static address native_method_throw_unsatisfied_link_error_entry();
362
363 static void register_finalizer(JavaThread* thread, oopDesc* obj);
364
365 // dtrace notifications
366 static int dtrace_object_alloc(oopDesc* o);
|