Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1813400imu; Thu, 17 Jan 2019 03:45:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN4uwh9e40jaETu7QtntLYofLbANpIbuAWg7XVS6F4tGE0VH8XOzQVUrb3UK/5gAOnpUTD2h X-Received: by 2002:a17:902:7481:: with SMTP id h1mr14764274pll.341.1547725556320; Thu, 17 Jan 2019 03:45:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547725556; cv=none; d=google.com; s=arc-20160816; b=RSeIAMVUS1l/UkP2S09DONKFwZ0RZ1qrEVNz+pt98Uyn20Bdp58661WyQ/UKCEQaXM Kwnoh5M8Qy2w0aUNLcOTXfdE2cnfEK+aTb3VXXG8Q5PByqQSNbYj4xLQ4H0b1E03/XtF GGZtfQxoaMxiTUV5Kuq2q93b+vA2+HhBugnRe98DB8swxHC6ICT9m5LpayAgLZmCNaXm f4LA6fKgd8Ji9UKP8ns0+tnkK1qFskOySwvg1ypiA1XLnf0/spTaRur+uOH7XvpAHxLd wlwVcxVPaxV5UnD40NDSQsjXVyYNrTtQcF3BsSRfAMS1zKqNx/oCoyNsWyIcF/njug+y lFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=3ozvmlOZ9aJTQ3dhxaSoLuvscLRV+aEetc/25c4+HSw=; b=w5RcVtm6xE9EkRwI8bQ2pYeAzxuNcZNcRbi2k4EAPi637otKlT0QbI1nRh49irdjqr Ed6WPo14B9UaA/9HsIzIiFDlT0lgI8Qui8TmhYt78TFTa3PE/p5D7ySqzMFKXvBoq8nI uSaiQG76mqL7ydlMY/Ff6qgewu3TNeNLgfOQRJwYBHo7G4d+Og7mU6ElT5PKR5ObOhKg 5UO208PTlDD4Uz3d9CMmu2v/a+0Nr0C50O+hhlHuMiQlqpdtzuy42b5ay6fLSIBWoQPS 5T1+C/oI+xiJfbYjfv4P9YKihBRh/qd975aQQh4XIohIw//g1QFqE2ZAJ9YxdrMqLH9z RlPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si1548875pfg.107.2019.01.17.03.45.40; Thu, 17 Jan 2019 03:45:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729326AbfAQJqa (ORCPT + 99 others); Thu, 17 Jan 2019 04:46:30 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39254 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729275AbfAQJq1 (ORCPT ); Thu, 17 Jan 2019 04:46:27 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0H9iGjK077160 for ; Thu, 17 Jan 2019 04:46:26 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q2pj6t9yg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Jan 2019 04:46:25 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Jan 2019 09:46:23 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 17 Jan 2019 09:46:20 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0H9kJ2I5439962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Jan 2019 09:46:19 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B26411C052; Thu, 17 Jan 2019 09:46:19 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2B44911C05B; Thu, 17 Jan 2019 09:46:18 +0000 (GMT) Received: from oc1548405160.ibm.com (unknown [9.124.35.202]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 17 Jan 2019 09:46:18 +0000 (GMT) From: Seeteena Thoufeek To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org Cc: s1seetee@linux.vnet.ibm.com Subject: [PATCH v2] perf scripts python: Add Python 3 support to stackcollapse.py Date: Thu, 17 Jan 2019 15:15:40 +0530 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1547718344-27382-1-git-send-email-s1seetee@linux.vnet.ibm.com> References: <1547718344-27382-1-git-send-email-s1seetee@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19011709-0008-0000-0000-000002B2361D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19011709-0009-0000-0000-0000221E5292 Message-Id: <1547718344-27382-13-git-send-email-s1seetee@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-17_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901170072 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Ravi Bangoria --- 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 # 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