Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1709749imu; Thu, 17 Jan 2019 01:53:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN5NjY/YH7Do5oHWBicalYu9JAR+O6+YHTP6dtMknAeS9R63NW1/Raf2Er7cf7feeYTMWQFT X-Received: by 2002:a62:e704:: with SMTP id s4mr14483604pfh.124.1547718780724; Thu, 17 Jan 2019 01:53:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547718780; cv=none; d=google.com; s=arc-20160816; b=Toh8eb7vivH/3LUyUzFo6dh/cn5ex3uTzRct/wtxavhIj0TSdKAcp3SCjd6sdu+PpA Xcwiqqq9yGwRySW1mvgVjlEC1wadBoTPdVcaJvlCz6izUJ78+FzgH8XdDnyGs0Eb0YKk Rou6h0rh5OC1tb/IlifxsJenPQiUtAhjHY+rqgv8+CHgIhyxJAOEHTu/kKAyQ64uMEA2 heTaSb6Xrikj1uAzFdanOFKetz0EvKlSciU1mx/1tzdrJ/FXKNCe9t9Uh1MtvBv/kgS5 e7A7n6ZuVc8bFycaWaZOjsPUGZfo9W299NpDpO3kmYa01Wqb2NzJhxPne2fSX9jM1kvJ 2Sfg== 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=oJbXSE4dxLVboWE412FMZFMRbU2LFeAzmP3pf2rXbs4=; b=VCVqSxsMiAVKo3sL3TnuCUFfytBpC5iJagjnI8pzRAim5W0wD4ErvPx0IUd2c8Y4Go Wb3fpPmhKEjUIn2uuuKy2gJGhFwhqQrOSbUT9KI1tYTQO9LGvI9oCouRtmDaTkJqfZTR jIcYccEif/c7v0wDYmBtIZ8HeDeZpJ3OAMo9xrFsekH6VMLtcoGlJof7O2sdhUDLhMjF Q8TMZJeMxC5rAiJvnSbm5FFNm3JlCxBK42eAaZRkYn1xZhLddo8DXxd0OOZ+WlHt1Kyv VpcSpccEG8/3n3a3porzh1UDeufLOvbGt12dbi+McVouvdLNarzQe+9JcjwkBxEkGlbh 80Hw== 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 z2si1180140pgs.267.2019.01.17.01.52.45; Thu, 17 Jan 2019 01:53:00 -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 S1729403AbfAQJqw (ORCPT + 99 others); Thu, 17 Jan 2019 04:46:52 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55398 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbfAQJq3 (ORCPT ); Thu, 17 Jan 2019 04:46:29 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0H9jaUK104925 for ; Thu, 17 Jan 2019 04:46:29 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q2mnd6xev-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Jan 2019 04:46:28 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Jan 2019 09:46:26 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) 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:23 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0H9kMeD42664102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Jan 2019 09:46:22 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 37E2A11C058; Thu, 17 Jan 2019 09:46:22 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CC46811C04A; Thu, 17 Jan 2019 09:46:20 +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:20 +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 stat-cpi.py Date: Thu, 17 Jan 2019 15:15:41 +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-0016-0000-0000-00000246A3B6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19011709-0017-0000-0000-000032A0C549 Message-Id: <1547718344-27382-14-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 stat-cpi.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/stat-cpi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/scripts/python/stat-cpi.py b/tools/perf/scripts/python/stat-cpi.py index 8410672..1d8e8b7 100644 --- a/tools/perf/scripts/python/stat-cpi.py +++ b/tools/perf/scripts/python/stat-cpi.py @@ -59,7 +59,7 @@ def stat__interval(time): if ins != 0: cpi = cyc/float(ins) - print "%15f: cpu %d, thread %d -> cpi %f (%d/%d)" % (time/(float(1000000000)), cpu, thread, cpi, cyc, ins) + print("%15f: cpu %d, thread %d -> cpi %f (%d/%d)" % (time/(float(1000000000)), cpu, thread, cpi, cyc, ins)) def trace_end(): pass -- 1.8.3.1