mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-03 18:20:25 +02:00 
			
		
		
		
	ftrace: Fix the output of profile
The first entry of the ftrace profile was always skipped when reading trace_stat/functionX. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <4A443D59.4080307@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
		
							parent
							
								
									1155de47cd
								
							
						
					
					
						commit
						0296e4254f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -291,7 +291,9 @@ function_stat_next(void *v, int idx)
 | 
			
		|||
	pg = (struct ftrace_profile_page *)((unsigned long)rec & PAGE_MASK);
 | 
			
		||||
 | 
			
		||||
 again:
 | 
			
		||||
	if (idx != 0)
 | 
			
		||||
		rec++;
 | 
			
		||||
 | 
			
		||||
	if ((void *)rec >= (void *)&pg->records[pg->index]) {
 | 
			
		||||
		pg = pg->next;
 | 
			
		||||
		if (!pg)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue