18 stripped_file = sys.argv[1]
22 bloaty_path = sys.argv[5]
25 symbols_file = sys.argv[6]
27 total_size_bytes_key = sys.argv[8]
28 lib_name = sys.argv[9]
29 magic_seperator = sys.argv[10]
36 props = propstr.split(
' ')
37 for i
in range(0, len(props), 2):
38 results[props[i]] = props[i+1]
40 keys = keystr.split(
' ')
41 for i
in range(0, len(keys), 2):
42 results[
'key'][keys[i]] = keys[i+1]
45 print(magic_seperator)
46 print(
'Report by file, then by symbol with ellided/combined templates')
47 lines = subprocess.check_output([bloaty_path, stripped_file,
48 '-d',
'compileunits,symbols',
'-s',
'file',
49 '-n',
'0',
'--tsv',
'--demangle=short',
50 '--debug-file=%s' % symbols_file],
53 print(magic_seperator)
54 print(
'Report by file, then by symbol with full templates')
55 lines = subprocess.check_output([bloaty_path, stripped_file,
56 '-d',
'compileunits,symbols',
'-s',
'file',
57 '-n',
'0',
'--tsv',
'--demangle=full',
58 '--debug-file=%s' % symbols_file],
61 print(magic_seperator)
63 print(
'Report by symbol, then by file with ellided/combined templates')
64 lines = subprocess.check_output([bloaty_path, stripped_file,
65 '-d',
'symbols,compileunits',
'-s',
'file',
66 '-n',
'0',
'--tsv',
'--demangle=short',
67 '--debug-file=%s' % symbols_file],
70 print(magic_seperator)
72 print(
'Report by symbol, then by file with full templates')
73 lines = subprocess.check_output([bloaty_path, stripped_file,
74 '-d',
'symbols,compileunits',
'-s',
'file',
75 '-n',
'0',
'--tsv',
'--demangle=full',
76 '--debug-file=%s' % symbols_file],
79 print(magic_seperator)
84 total_size_bytes_key: grand_total
88 results[
'results'][lib_name] = r
91 print(json.dumps(results, indent=2))
93 with open(os.path.join(out_dir, lib_name+
'.json'),
'w')
as output:
94 output.write(json.dumps(results, indent=2))