aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-10-01 18:38:39 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:42 -0400
commitf6da559d5b88981000d4c575b6384f59d30dec22 (patch)
tree00fab354584931dd6f88dc275c26260c17259379 /vm_trace.c
parent25eed2848344f19385b39daaac8ca5eef79f9466 (diff)
downloadruby-f6da559d5b88981000d4c575b6384f59d30dec22.tar.gz
Put YJIT into a single compilation unit
For upstreaming, we want functions we export either prefixed with "rb_" or made static. Historically we haven't been following this rule, so we were "leaking" a lot of symbols as `make leak-globals` would tell us. This change unifies everything YJIT into a single compilation unit, yjit.o, and makes everything unprefixed static to pass `make leak-globals`. This manual "unified build" setup is similar to that of vm.o. Having everything in one compilation unit allows static functions to be visible across YJIT files and removes the need for declarations in headers in some cases. Unnecessary declarations were removed. Other changes of note: - switched to MJIT_SYMBOL_EXPORT_BEGIN which indicates stuff as being off limits for native extensions - the first include of each YJIT file is change to be "internal.h" - undefined MAP_STACK before explicitly redefining it since it collide's with a definition in system headers. Consider renaming?
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_trace.c b/vm_trace.c
index c410b709b5..b22b2ceb34 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -106,7 +106,7 @@ update_global_event_hook(rb_event_flag_t vm_events)
// Invalidate all code if listening for any TracePoint event.
// Internal events fire inside C routines so don't need special handling.
// Do this last so other ractors see updated vm events when they wake up.
- yjit_tracing_invalidate_all();
+ rb_yjit_tracing_invalidate_all();
}
}
@@ -1220,7 +1220,7 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line)
rb_raise(rb_eArgError, "can not enable any hooks");
}
- yjit_tracing_invalidate_all();
+ rb_yjit_tracing_invalidate_all();
ruby_vm_event_local_num++;