mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 02:11:25 +01:00 
			
		
		
		
	trace: Move trace_clocks description above record offset calculation
Flyrecord tracing data are page aligned that's why it is necessary to calculate alignment properly. Because trace_clocks description is the part of record length it is necessary to have information about length earlier. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									83711374ee
								
							
						
					
					
						commit
						5ae43b8706
					
				@ -1500,6 +1500,10 @@ static int write_flyrecord(struct twriter *tw, enum out_format_t out_format,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	tw->ptr += fprintf(fout, "flyrecord%c", 0);
 | 
						tw->ptr += fprintf(fout, "flyrecord%c", 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						snprintf(str, sizeof(str),
 | 
				
			||||||
 | 
							 "[local] global counter uptime perf mono mono_raw boot x86-tsc\n");
 | 
				
			||||||
 | 
						len = strlen(str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* trace data */
 | 
						/* trace data */
 | 
				
			||||||
	start = ALIGN(tw->ptr + 16, TRACE_PAGE_SIZE);
 | 
						start = ALIGN(tw->ptr + 16, TRACE_PAGE_SIZE);
 | 
				
			||||||
	tw->ptr += tputq(fout, start);
 | 
						tw->ptr += tputq(fout, start);
 | 
				
			||||||
@ -1510,9 +1514,6 @@ static int write_flyrecord(struct twriter *tw, enum out_format_t out_format,
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	tw->ptr += ret;
 | 
						tw->ptr += ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	snprintf(str, sizeof(str),
 | 
					 | 
				
			||||||
		 "[local] global counter uptime perf mono mono_raw boot x86-tsc\n");
 | 
					 | 
				
			||||||
	len = strlen(str);
 | 
					 | 
				
			||||||
	tw->ptr += tputq(fout, len);
 | 
						tw->ptr += tputq(fout, len);
 | 
				
			||||||
	tw->ptr += tputs(fout, str);
 | 
						tw->ptr += tputs(fout, str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user