mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	probes_helper.h: RUBY_DTRACE_HOOK
* probes_helper.h (RUBY_DTRACE_HOOK): surround with do..while. * vm.c (vm_exec): supply semicolon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									4a0cda64b2
								
							
						
					
					
						commit
						b949447a49
					
				
					 2 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -7,6 +7,7 @@
 | 
			
		|||
VALUE rb_class_path_no_cache(VALUE _klass);
 | 
			
		||||
 | 
			
		||||
#define RUBY_DTRACE_HOOK(name, th, klazz, id) \
 | 
			
		||||
do { \
 | 
			
		||||
    if (RUBY_DTRACE_##name##_ENABLED()) { \
 | 
			
		||||
	VALUE _klass = (klazz); \
 | 
			
		||||
	VALUE _id = (id); \
 | 
			
		||||
| 
						 | 
				
			
			@ -49,6 +50,7 @@ VALUE rb_class_path_no_cache(VALUE _klass);
 | 
			
		|||
	    } \
 | 
			
		||||
	} \
 | 
			
		||||
    } \
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define RUBY_DTRACE_METHOD_ENTRY_HOOK(th, klass, id) \
 | 
			
		||||
    RUBY_DTRACE_HOOK(METHOD_ENTRY, th, klass, id)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								vm.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								vm.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1359,7 +1359,7 @@ vm_exec(rb_thread_t *th)
 | 
			
		|||
 | 
			
		||||
	    switch (VM_FRAME_TYPE(th->cfp)) {
 | 
			
		||||
	      case VM_FRAME_MAGIC_METHOD:
 | 
			
		||||
		RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0)
 | 
			
		||||
		RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
 | 
			
		||||
		EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0, Qnil);
 | 
			
		||||
		break;
 | 
			
		||||
	      case VM_FRAME_MAGIC_BLOCK:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue