diff --git a/gc/default.c b/gc/default.c index 4bb4e7cba6..063ab7f572 100644 --- a/gc/default.c +++ b/gc/default.c @@ -25,7 +25,10 @@ #include "darray.h" #include "gc/gc.h" #include "gc/gc_impl.h" -#include "probes.h" + +#ifndef BUILDING_SHARED_GC +# include "probes.h" +#endif #include "debug_counter.h" #include "internal/sanitizers.h" @@ -8840,8 +8843,13 @@ gc_prof_timer_stop(rb_objspace_t *objspace) } } -#define RUBY_DTRACE_GC_HOOK(name) \ +#ifdef BUILDING_SHARED_GC +# define RUBY_DTRACE_GC_HOOK(name) +#else +# define RUBY_DTRACE_GC_HOOK(name) \ do {if (RUBY_DTRACE_GC_##name##_ENABLED()) RUBY_DTRACE_GC_##name();} while (0) +#endif + static inline void gc_prof_mark_timer_start(rb_objspace_t *objspace) {