Skip to content

Commit 5fb8966

Browse files
committed
Simplify the output further
1 parent daf9d4c commit 5fb8966

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tool/extract_host_inlining.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,18 @@
4545
}
4646

4747
lines = lines.reject { |line|
48-
line.include?('DEAD') and line.include?('reason the invoke is dead code')
48+
line.include?('DEAD') and line.match?(/reason (the invoke is dead code|not a method call target)/)
4949
}
5050
end
5151

5252
# Reduce line width for unimportant information
5353
lines = lines.map { |line|
54-
line.sub(/\[inlined\s.+?invoke\s+(true|false),/, '')
54+
line.sub(/\[inlined\s.+?invoke\s+(true|false),\s+/, '')
5555
.sub(/,\s*incomplete\s+(true|false),/, ',')
56+
.sub(/frequency\s+1\.0+,\s+/, '')
5657
}
5758

59+
min_space_before_cost = lines[2..-1].map { |line| line[/([ ]+)cost /, 1].size }.min
60+
lines = lines.map { |line| line.sub(/[ ]{#{min_space_before_cost}}cost /, ' cost ') }
61+
5862
puts lines.join

0 commit comments

Comments
 (0)