mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Add debug counter for VM <-> MJIT calls
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									fe979e5bce
								
							
						
					
					
						commit
						5a6b0e39a1
					
				
					 2 changed files with 16 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -263,6 +263,12 @@ RB_DEBUG_COUNTER(mjit_exec_not_ready)
 | 
			
		|||
RB_DEBUG_COUNTER(mjit_exec_not_compiled)
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_exec_call_func)
 | 
			
		||||
 | 
			
		||||
/* MJIT <-> VM frame push counts */
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_frame_VM2VM)
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_frame_VM2JT)
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_frame_JT2JT)
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_frame_JT2VM)
 | 
			
		||||
 | 
			
		||||
/* MJIT cancel counters */
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_cancel)
 | 
			
		||||
RB_DEBUG_COUNTER(mjit_cancel_ivar)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								mjit.h
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								mjit.h
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -110,6 +110,11 @@ mjit_exec(rb_execution_context_t *ec)
 | 
			
		|||
 | 
			
		||||
    func = body->jit_func;
 | 
			
		||||
    if (UNLIKELY((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC)) {
 | 
			
		||||
#     ifdef MJIT_HEADER
 | 
			
		||||
        RB_DEBUG_COUNTER_INC(mjit_frame_JT2VM);
 | 
			
		||||
#     else
 | 
			
		||||
        RB_DEBUG_COUNTER_INC(mjit_frame_VM2VM);
 | 
			
		||||
#     endif
 | 
			
		||||
        switch ((enum rb_mjit_iseq_func)func) {
 | 
			
		||||
          case NOT_ADDED_JIT_ISEQ_FUNC:
 | 
			
		||||
            RB_DEBUG_COUNTER_INC(mjit_exec_not_added);
 | 
			
		||||
| 
						 | 
				
			
			@ -132,6 +137,11 @@ mjit_exec(rb_execution_context_t *ec)
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#   ifdef MJIT_HEADER
 | 
			
		||||
      RB_DEBUG_COUNTER_INC(mjit_frame_JT2JT);
 | 
			
		||||
#   else
 | 
			
		||||
      RB_DEBUG_COUNTER_INC(mjit_frame_VM2JT);
 | 
			
		||||
#   endif
 | 
			
		||||
    RB_DEBUG_COUNTER_INC(mjit_exec_call_func);
 | 
			
		||||
    return func(ec, ec->cfp);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue