Counting C method calls in CRuby

There is a central macro in CRuby, RUBY_VM_CHECK_INTS , which is a very hot path for the Ruby runtime. It&rsquo;s an important part of how threads are managed, and it&rsquo;s called constantly . I was curious just how often it was called, and it turned out CRuby comes with some handy debugging functionality for just this scenario. Inside of debug_counter.h , I changed #define USE_DEBUG_COUNTER 0…