@@ -343,24 +343,6 @@ rb_yjit_reserve_addr_space(uint32_t mem_size)
343343#endif
344344}
345345
346- // Is anyone listening for :c_call and :c_return event currently?
347- bool
348- rb_c_method_tracing_currently_enabled (const rb_execution_context_t * ec )
349- {
350- rb_event_flag_t tracing_events ;
351- if (rb_multi_ractor_p ()) {
352- tracing_events = ruby_vm_event_enabled_global_flags ;
353- }
354- else {
355- // At the time of writing, events are never removed from
356- // ruby_vm_event_enabled_global_flags so always checking using it would
357- // mean we don't compile even after tracing is disabled.
358- tracing_events = rb_ec_ractor_hooks (ec )-> events ;
359- }
360-
361- return tracing_events & (RUBY_EVENT_C_CALL | RUBY_EVENT_C_RETURN );
362- }
363-
364346// The code we generate in gen_send_cfunc() doesn't fire the c_return TracePoint event
365347// like the interpreter. When tracing for c_return is enabled, we patch the code after
366348// the C method return to call into this to fire the event.
@@ -414,18 +396,6 @@ rb_iseq_set_yjit_payload(const rb_iseq_t *iseq, void *payload)
414396 iseq -> body -> yjit_payload = payload ;
415397}
416398
417- void
418- rb_iseq_reset_jit_func (const rb_iseq_t * iseq )
419- {
420- RUBY_ASSERT_ALWAYS (IMEMO_TYPE_P (iseq , imemo_iseq ));
421- iseq -> body -> jit_entry = NULL ;
422- iseq -> body -> jit_exception = NULL ;
423- // Enable re-compiling this ISEQ. Event when it's invalidated for TracePoint,
424- // we'd like to re-compile ISEQs that haven't been converted to trace_* insns.
425- iseq -> body -> jit_entry_calls = 0 ;
426- iseq -> body -> jit_exception_calls = 0 ;
427- }
428-
429399rb_proc_t *
430400rb_yjit_get_proc_ptr (VALUE procv )
431401{
@@ -650,41 +620,6 @@ rb_yjit_constcache_shareable(const struct iseq_inline_constant_cache_entry *ice)
650620 return (ice -> flags & IMEMO_CONST_CACHE_SHAREABLE ) != 0 ;
651621}
652622
653- // Used for passing a callback and other data over rb_objspace_each_objects
654- struct iseq_callback_data {
655- rb_iseq_callback callback ;
656- void * data ;
657- };
658-
659- // Heap-walking callback for rb_yjit_for_each_iseq().
660- static int
661- for_each_iseq_i (void * vstart , void * vend , size_t stride , void * data )
662- {
663- const struct iseq_callback_data * callback_data = (struct iseq_callback_data * )data ;
664- VALUE v = (VALUE )vstart ;
665- for (; v != (VALUE )vend ; v += stride ) {
666- void * ptr = rb_asan_poisoned_object_p (v );
667- rb_asan_unpoison_object (v , false);
668-
669- if (rb_obj_is_iseq (v )) {
670- rb_iseq_t * iseq = (rb_iseq_t * )v ;
671- callback_data -> callback (iseq , callback_data -> data );
672- }
673-
674- asan_poison_object_if (ptr , v );
675- }
676- return 0 ;
677- }
678-
679- // Iterate through the whole GC heap and invoke a callback for each iseq.
680- // Used for global code invalidation.
681- void
682- rb_yjit_for_each_iseq (rb_iseq_callback callback , void * data )
683- {
684- struct iseq_callback_data callback_data = { .callback = callback , .data = data };
685- rb_objspace_each_objects (for_each_iseq_i , (void * )& callback_data );
686- }
687-
688623// For running write barriers from Rust. Required when we add a new edge in the
689624// object graph from `old` to `young`.
690625void
0 commit comments