make a shell script out of the template
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								95fefedba4
							
						
					
				
			
			
				commit
				
					
						eab894e608
					
				
			
		
					 1 changed files with 23 additions and 12 deletions
				
			
		
							
								
								
									
										35
									
								
								doc/dev/benchmark-oprofile
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										35
									
								
								doc/dev/benchmark-oprofile
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
					@ -1,12 +1,23 @@
 | 
				
			||||||
10:37 <dynamite> #!/bin/sh
 | 
					#!/bin/sh -x
 | 
				
			||||||
10:37 <dynamite> opcontrol --no-vmlinux > /dev/null
 | 
					
 | 
				
			||||||
10:37 <dynamite> opcontrol --stop > /dev/null
 | 
					# Cleanup
 | 
				
			||||||
10:37 <dynamite> opcontrol --shutdown > /dev/null
 | 
					opcontrol --no-vmlinux
 | 
				
			||||||
10:37 <dynamite> opcontrol --reset > /dev/null
 | 
					opcontrol --stop
 | 
				
			||||||
10:37 <dynamite> opcontrol --separate=none > /dev/null
 | 
					opcontrol --shutdown
 | 
				
			||||||
10:37 <dynamite> opcontrol $* > /dev/null
 | 
					opcontrol --reset
 | 
				
			||||||
10:37 <dynamite> opcontrol --start > /dev/null
 | 
					
 | 
				
			||||||
10:37 <dynamite> ./urpcbench 0 0 1
 | 
					# Record all calls
 | 
				
			||||||
10:37 <dynamite> opcontrol --stop > /dev/null
 | 
					opcontrol --separate=none
 | 
				
			||||||
10:37 <dynamite> opcontrol --dump > /dev/null
 | 
					
 | 
				
			||||||
10:37 <dynamite> opreport -l urpcbench
 | 
					# NMI conflicts with oprofile
 | 
				
			||||||
 | 
					echo 0 > /proc/sys/kernel/nmi_watchdog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Select events to be recorded
 | 
				
			||||||
 | 
					opcontrol --event=CPU_CLK_UNHALTED:30000:0:1:1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					opcontrol --start
 | 
				
			||||||
 | 
					# The actual programm
 | 
				
			||||||
 | 
					"$@"
 | 
				
			||||||
 | 
					opcontrol --stop
 | 
				
			||||||
 | 
					opcontrol --dump
 | 
				
			||||||
 | 
					echo "Output: opreport -l"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue