diff options
author | Andy Shevchenko <[email protected]> | 2017-11-29 16:11:05 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-11-29 18:40:43 -0800 |
commit | edbddb83a15b4361d8c3bf00aabee85fd3ef4d80 (patch) | |
tree | eff0436d3923cb327dbec8251657a411e19d0f43 /scripts/gdb/linux | |
parent | d5dabd633922ac5ee5bcc67748f7defb8b211469 (diff) |
scripts/bloat-o-meter: don't fail with division by 0
Under some circumstances it's possible to get a divider 0 which crashes
the script.
Traceback (most recent call last):
File "linux/scripts/bloat-o-meter", line 98, in <module>
print_result("Function", "tTdDbBrR", 2)
File "linux/scripts/bloat-o-meter", line 87, in print_result
(otot, ntot, (ntot - otot)*100.0/otot))
ZeroDivisionError: float division by zero
Hide this by checking the divider first.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Vaneet Narang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions