mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Add debug counter for unload_units
changing add_iseq_to_process's debug counter name as well for comparison
This commit is contained in:
		
							parent
							
								
									67fbc122fb
								
							
						
					
					
						commit
						f6a54e6e46
					
				
					 3 changed files with 6 additions and 2 deletions
				
			
		|  | @ -311,11 +311,14 @@ RB_DEBUG_COUNTER(theap_evacuate) | |||
| /* mjit_exec() counts */ | ||||
| RB_DEBUG_COUNTER(mjit_exec) | ||||
| RB_DEBUG_COUNTER(mjit_exec_not_added) | ||||
| RB_DEBUG_COUNTER(mjit_exec_not_added_add_iseq) | ||||
| RB_DEBUG_COUNTER(mjit_exec_not_ready) | ||||
| RB_DEBUG_COUNTER(mjit_exec_not_compiled) | ||||
| RB_DEBUG_COUNTER(mjit_exec_call_func) | ||||
| 
 | ||||
| /* MJIT enqueue / unload */ | ||||
| RB_DEBUG_COUNTER(mjit_add_iseq_to_process) | ||||
| RB_DEBUG_COUNTER(mjit_unload_units) | ||||
| 
 | ||||
| /* MJIT <-> VM frame push counts */ | ||||
| RB_DEBUG_COUNTER(mjit_frame_VM2VM) | ||||
| RB_DEBUG_COUNTER(mjit_frame_VM2JT) | ||||
|  |  | |||
							
								
								
									
										2
									
								
								mjit.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								mjit.c
									
										
									
									
									
								
							|  | @ -377,6 +377,7 @@ mjit_add_iseq_to_process(const rb_iseq_t *iseq, const struct rb_mjit_compile_inf | |||
|     if (!mjit_enabled || pch_status == PCH_FAILED) | ||||
|         return; | ||||
| 
 | ||||
|     RB_DEBUG_COUNTER_INC(mjit_add_iseq_to_process); | ||||
|     iseq->body->jit_func = (mjit_func_t)NOT_READY_JIT_ISEQ_FUNC; | ||||
|     create_unit(iseq); | ||||
|     if (iseq->body->jit_unit == NULL) | ||||
|  | @ -388,6 +389,7 @@ mjit_add_iseq_to_process(const rb_iseq_t *iseq, const struct rb_mjit_compile_inf | |||
|     CRITICAL_SECTION_START(3, "in add_iseq_to_process"); | ||||
|     add_to_list(iseq->body->jit_unit, &unit_queue); | ||||
|     if (active_units.length >= mjit_opts.max_cache_size) { | ||||
|         RB_DEBUG_COUNTER_INC(mjit_unload_units); | ||||
|         unload_units(); | ||||
|     } | ||||
|     verbose(3, "Sending wakeup signal to workers in mjit_add_iseq_to_process"); | ||||
|  |  | |||
							
								
								
									
										1
									
								
								mjit.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								mjit.h
									
										
									
									
									
								
							|  | @ -138,7 +138,6 @@ mjit_exec(rb_execution_context_t *ec) | |||
|           case NOT_ADDED_JIT_ISEQ_FUNC: | ||||
|             RB_DEBUG_COUNTER_INC(mjit_exec_not_added); | ||||
|             if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) { | ||||
|                 RB_DEBUG_COUNTER_INC(mjit_exec_not_added_add_iseq); | ||||
|                 rb_mjit_add_iseq_to_process(iseq); | ||||
|                 if (UNLIKELY(mjit_opts.wait)) { | ||||
|                     return rb_mjit_wait_call(ec, body); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Takashi Kokubun
						Takashi Kokubun