11#ifndef USE_DEBUG_COUNTER
12#define USE_DEBUG_COUNTER 0
15#ifdef RB_DEBUG_COUNTER
384#ifndef RUBY_DEBUG_COUNTER_H
385#define RUBY_DEBUG_COUNTER_H 1
391#if !defined(__GNUC__) && USE_DEBUG_COUNTER
392#error "USE_DEBUG_COUNTER is not supported by other than __GNUC__"
396#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_##name,
399#undef RB_DEBUG_COUNTER
403extern size_t rb_debug_counter[];
415 rb_debug_counter_add_atomic(
type,
add);
425 if (rb_debug_counter[(
int)
type] <
num) {
437#define RB_DEBUG_COUNTER_INC(type) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, 1)
438#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !(cond)))
439#define RB_DEBUG_COUNTER_INC_IF(type, cond) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !!(cond))
440#define RB_DEBUG_COUNTER_ADD(type, num) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, (num), 1)
441#define RB_DEBUG_COUNTER_SETMAX(type, num) rb_debug_counter_max(RB_DEBUG_COUNTER_##type, (unsigned int)(num))
444#define RB_DEBUG_COUNTER_INC(type) ((void)0)
445#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!!(cond))
446#define RB_DEBUG_COUNTER_INC_IF(type, cond) (!!(cond))
447#define RB_DEBUG_COUNTER_ADD(type, num) ((void)0)
448#define RB_DEBUG_COUNTER_SETMAX(type, num) 0
453RUBY_SYMBOL_EXPORT_BEGIN
459RUBY_SYMBOL_EXPORT_END
void rb_debug_counter_show_results(const char *msg)
#define RB_DEBUG_COUNTER(name)
size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr)
void ruby_debug_counter_show_at_exit(int enable)
void ruby_debug_counter_reset(void)
Thin wrapper to ruby/config.h.
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
VALUE type(ANYARGS)
ANYARGS-ed function type.
rb_ractor_t * ruby_single_main_ractor