mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	scripts/bloat-o-meter: Support comparing library archives
Library archives (.a) usually contain multiple object files so their output of nm --size-sort contains lines like: <omitted for brevity> 00000000000003a8 t run_test extent-map-tests.o: <omitted for brevity> bloat-o-meter currently doesn't handle them which results in errors when calling .split() on them. Fix this by simply ignoring them. This enables diffing subsystems which generate built-in.a files. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/20200603103513.3712-1-nborisov@suse.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									4f491bb6ea
								
							
						
					
					
						commit
						1d35b6054a
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -26,6 +26,8 @@ def getsizes(file, format): | ||||||
|     sym = {} |     sym = {} | ||||||
|     with os.popen("nm --size-sort " + file) as f: |     with os.popen("nm --size-sort " + file) as f: | ||||||
|         for line in f: |         for line in f: | ||||||
|  |             if line.startswith("\n") or ":" in line: | ||||||
|  |                 continue | ||||||
|             size, type, name = line.split() |             size, type, name = line.split() | ||||||
|             if type in format: |             if type in format: | ||||||
|                 # strip generated symbols |                 # strip generated symbols | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Nikolay Borisov
						Nikolay Borisov