Skip to content

Commit

Permalink
Fix TracePoint tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Mar 6, 2023
1 parent 3b39851 commit 652d637
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mjit.c
Expand Up @@ -370,7 +370,7 @@ mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname, int id)
// JIT buffer
uint8_t *rb_mjit_mem_block = NULL;

MJIT_FUNC_EXPORTED void
void
rb_mjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop)
{
if (!mjit_call_p) return;
Expand All @@ -384,6 +384,13 @@ rb_mjit_before_ractor_spawn(void)
mjit_call_p = false;
}

void
rb_mjit_tracing_invalidate_all(rb_event_flag_t new_iseq_events)
{
if (!mjit_call_p) return;
mjit_call_p = false;
}

void
rb_mjit_compile(const rb_iseq_t *iseq)
{
Expand Down
2 changes: 2 additions & 0 deletions mjit.h
Expand Up @@ -116,6 +116,7 @@ void mjit_child_after_fork(void);

extern void rb_mjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop);
extern void rb_mjit_before_ractor_spawn(void);
extern void rb_mjit_tracing_invalidate_all(rb_event_flag_t new_iseq_events);

# ifdef MJIT_HEADER
#define mjit_enabled true
Expand Down Expand Up @@ -148,6 +149,7 @@ static inline void mjit_finish(bool close_handle_p){}

static inline void rb_mjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop) {}
static inline void rb_mjit_before_ractor_spawn(void) {}
static inline void rb_mjit_tracing_invalidate_all(rb_event_flag_t new_iseq_events) {}

# endif // USE_MJIT
#endif // RUBY_MJIT_H

0 comments on commit 652d637

Please sign in to comment.