Commit 72214a24 authored by Sergey Senozhatsky's avatar Sergey Senozhatsky Committed by Linus Torvalds

scripts/bloat-o-meter: fix python3 syntax error

In Python3+ print is a function so the old syntax is not correct
anymore:

  $ ./scripts/bloat-o-meter vmlinux.o vmlinux.o.old
    File "./scripts/bloat-o-meter", line 61
      print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
                                                                     ^
  SyntaxError: invalid syntax

Fix by calling print as a function.

Tested on python 2.7.11, 3.5.1
Signed-off-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ea535e41
...@@ -58,8 +58,8 @@ for name in common: ...@@ -58,8 +58,8 @@ for name in common:
delta.sort() delta.sort()
delta.reverse() delta.reverse()
print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \ print("add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
(add, remove, grow, shrink, up, -down, up-down) (add, remove, grow, shrink, up, -down, up-down))
print "%-40s %7s %7s %+7s" % ("function", "old", "new", "delta") print("%-40s %7s %7s %+7s" % ("function", "old", "new", "delta"))
for d, n in delta: for d, n in delta:
if d: print "%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d) if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment