mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	tracing: Set kernel_stack's caller size properly
I noticed when trying to use the trace-cmd python interface that reading the raw buffer wasn't working for kernel_stack events. This is because it uses a stubbed version of __dynamic_array that doesn't do the __data_loc trick and encode the length of the array into the field. Instead it just shows up as a size of 0. So change this to __array and set the len to FTRACE_STACK_ENTRIES since this is what we actually do in practice and matches how user_stack_trace works. Link: http://lkml.kernel.org/r/1411589652-1318-1-git-send-email-jbacik@fb.com Signed-off-by: Josef Bacik <jbacik@fb.com> [ Pulled from the archeological digging of my INBOX ] Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
		
							parent
							
								
									afccc00f75
								
							
						
					
					
						commit
						cbc3b92ce0
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -174,7 +174,7 @@ FTRACE_ENTRY(kernel_stack, stack_entry,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	F_STRUCT(
 | 
						F_STRUCT(
 | 
				
			||||||
		__field(	int,		size	)
 | 
							__field(	int,		size	)
 | 
				
			||||||
		__dynamic_array(unsigned long,	caller	)
 | 
							__array(	unsigned long,	caller,	FTRACE_STACK_ENTRIES	)
 | 
				
			||||||
	),
 | 
						),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	F_printk("\t=> %ps\n\t=> %ps\n\t=> %ps\n"
 | 
						F_printk("\t=> %ps\n\t=> %ps\n\t=> %ps\n"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue