lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Jan 2019 15:15:40 +0530
From:   Seeteena Thoufeek <s1seetee@...ux.vnet.ibm.com>
To:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, linux-kernel@...r.kernel.org
Cc:     s1seetee@...ux.vnet.ibm.com
Subject: [PATCH v2] perf scripts python: Add Python 3 support to stackcollapse.py

Support both Python 2 and Python 3 in stackcollapse.py. ``print`` is now a
function rather than a statement. This should have no functional change.

Signed-off-by: Seeteena Thoufeek <s1seetee@...ux.vnet.ibm.com>
Reviewed-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
---
 tools/perf/scripts/python/stackcollapse.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/scripts/python/stackcollapse.py b/tools/perf/scripts/python/stackcollapse.py
index 1697b5e..f77bc0d 100755
--- a/tools/perf/scripts/python/stackcollapse.py
+++ b/tools/perf/scripts/python/stackcollapse.py
@@ -18,6 +18,7 @@
 #
 # Written by Paolo Bonzini <pbonzini@...hat.com>
 # Based on Brendan Gregg's stackcollapse-perf.pl script.
+from __future__ import print_function
 
 import os
 import sys
@@ -123,4 +124,4 @@ def trace_end():
     list = lines.keys()
     list.sort()
     for stack in list:
-        print "%s %d" % (stack, lines[stack])
+        print("%s %d" % (stack, lines[stack]))
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ