[前][次][番号順一覧][スレッド一覧]

ruby-changes:55171

From: k0kubun <ko1@a...>
Date: Fri, 29 Mar 2019 22:25:03 +0900 (JST)
Subject: [ruby-changes:55171] k0kubun:r67378 (trunk): Add debug counter for rb_mjit_unit_list

k0kubun	2019-03-29 22:24:56 +0900 (Fri, 29 Mar 2019)

  New Revision: 67378

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67378

  Log:
    Add debug counter for rb_mjit_unit_list

  Modified files:
    trunk/debug_counter.h
    trunk/mjit.c
Index: debug_counter.h
===================================================================
--- debug_counter.h	(revision 67377)
+++ debug_counter.h	(revision 67378)
@@ -263,6 +263,11 @@ RB_DEBUG_COUNTER(mjit_exec_not_added_add https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L263
 RB_DEBUG_COUNTER(mjit_exec_not_ready)
 RB_DEBUG_COUNTER(mjit_exec_not_compiled)
 
+/* rb_mjit_unit_list length */
+RB_DEBUG_COUNTER(mjit_length_unit_queue)
+RB_DEBUG_COUNTER(mjit_length_active_units)
+RB_DEBUG_COUNTER(mjit_length_compact_units)
+
 /* load (not implemented yet) */
 /*
 RB_DEBUG_COUNTER(load_files)
Index: mjit.c
===================================================================
--- mjit.c	(revision 67377)
+++ mjit.c	(revision 67378)
@@ -781,6 +781,12 @@ mjit_finish(bool close_handle_p) https://github.com/ruby/ruby/blob/trunk/mjit.c#L781
     if (!mjit_enabled)
         return;
 
+#if USE_DEBUG_COUNTER
+    rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_unit_queue, unit_queue.length, 1);
+    rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_active_units, active_units.length, 1);
+    rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_compact_units, compact_units.length, 1);
+#endif
+
     /* Wait for pch finish */
     verbose(2, "Stopping worker thread");
     CRITICAL_SECTION_START(3, "in mjit_finish to wakeup from pch");

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]