ruby-changes:55175
From: k0kubun <ko1@a...>
Date: Fri, 29 Mar 2019 23:44:15 +0900 (JST)
Subject: [ruby-changes:55175] k0kubun:r67382 (trunk): Add mjit_compile_failures debug counter
k0kubun 2019-03-29 23:44:09 +0900 (Fri, 29 Mar 2019) New Revision: 67382 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67382 Log: Add mjit_compile_failures debug counter Modified files: trunk/debug_counter.h trunk/mjit_worker.c Index: debug_counter.h =================================================================== --- debug_counter.h (revision 67381) +++ debug_counter.h (revision 67382) @@ -275,6 +275,9 @@ RB_DEBUG_COUNTER(mjit_length_unit_queue) https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L275 RB_DEBUG_COUNTER(mjit_length_active_units) RB_DEBUG_COUNTER(mjit_length_compact_units) +/* Other MJIT counters */ +RB_DEBUG_COUNTER(mjit_compile_failures) + /* load (not implemented yet) */ /* RB_DEBUG_COUNTER(load_files) Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 67381) +++ mjit_worker.c (revision 67382) @@ -1241,6 +1241,7 @@ mjit_worker(void) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L1241 if (unit) { // JIT compile mjit_func_t func = convert_unit_to_func(unit); + RB_DEBUG_COUNTER_INC_IF(mjit_compile_failures, func == (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC); // `mjit_copy_cache_from_main_thread` in `mjit_compile` may wait for a long time // and worker may be stopped during the compilation. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/