diff options
author | Peter Zhu <[email protected]> | 2024-07-12 11:38:42 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-07-16 09:09:41 -0400 |
commit | 93489d536bdb17da54613f7ef7a8115577963ceb (patch) | |
tree | 2ca7b1a458eda367f7649dd34d973bcbf7f4614d | |
parent | db3472d84c0e348fd0774a122281b0d7e5bf6352 (diff) |
Remove dependency on dtrace when building shared GC
-rw-r--r-- | gc/default.c | 12 |
1 files changed, 10 insertions, 2 deletions
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) { |