mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Exclude padding section from minimal build size report (#22578)
### Description <!-- Describe your changes. --> Should make the binary size report more stable as changes < 4K can occur when a padding boundary is crossed. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
parent
3ae7c3c0a6
commit
b9903617b6
1 changed files with 5 additions and 0 deletions
|
|
@ -34,8 +34,13 @@ def get_section_sizes(binary_path, readelf_path, dump_to_file=None):
|
|||
for match in re.finditer(r"\[[\s\d]+\] (\..*)$", output, re.MULTILINE):
|
||||
items = match.group(1).split()
|
||||
name = items[0]
|
||||
if name == ".relro_padding":
|
||||
# padding fluctuates and isn't due to the actual code. as it adds noise to the diff exclude it
|
||||
continue
|
||||
|
||||
# convert size from hex to int
|
||||
size = int(items[4], 16)
|
||||
|
||||
section_sizes[name] = size
|
||||
|
||||
if dump_to_file:
|
||||
|
|
|
|||
Loading…
Reference in a new issue