Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1216658imu; Wed, 16 Jan 2019 15:01:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN5aqk5lAGe7VUcSdoBeeBxCbsqQuGStYcNGBC5ihbFI22hMIat6Z4Z/OSX4XxVnK4WFnD1A X-Received: by 2002:a17:902:9691:: with SMTP id n17mr12678724plp.9.1547679701382; Wed, 16 Jan 2019 15:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547679701; cv=none; d=google.com; s=arc-20160816; b=HDUiLkAWL4aQ78KJv8j411ydbn8bzxn27gsU4nETVYPj4hIPFtZBk3cpJAHU5wa13n HNXJlg8XS2ZEaDuOGfLdn2aj8TNZTXdhmvOw30Qk+7T7equ5RAyRW2xlnh9Hyo2mUGEe 4UEb3HE/ml8lnF/OLQI4JYtqDDz/Z5qwUcKmOCYywVqAgFRDq3rZy6tobwvuwXYJ/URy PLvP2woq/QTajx00gs9GDG0j5l+sNwLwyn9r6I3xosz7qeq/P2w+vXMalj3miifL8Zf4 lORcThWGrOUMDNNBGNAQAhmsxZjWwT59DPYrmLU2QcrmbO25jmrB5+XMKQCXGrwPlX9b 98qA== 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=wi22mcSjEjgWJuejzH4uwAEHQGNqO4FmZdvYbnt9uCW++VEHPnPhScStqkFaH7GPEV ZLioppmy1zPvXv/CtKkr7l7xft74F6fkA67FnkJDeUQzJg1WlvflP8FSBk73Oiy6DkcK gpbRo5e4GhvKzAPyEGKWgN6RJqMGSH8/fdnhTIcyrUR5Wl99l9Pnd0RMCzfeVHSdvLJk admfqRsf4AWKa0AedcnzCeed08Tc/dfpdSEFBH4unr3MRPO+sTL7Y2bECIiyikxKbjgX +k+NuBPYbmDEDCMFR4JzEkuZc8uCe/LwoMSHNr6FBylYrtb9k9LkDpwqGlR1RDkG3Kb0 hMJg== 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 j12si6724017pgq.26.2019.01.16.15.01.25; Wed, 16 Jan 2019 15:01:41 -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 S2405624AbfAPQZH (ORCPT + 99 others); Wed, 16 Jan 2019 11:25:07 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53358 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731613AbfAPQYp (ORCPT ); Wed, 16 Jan 2019 11:24:45 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0GGJqBP059317 for ; Wed, 16 Jan 2019 11:24:44 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q27kbsmw5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Jan 2019 11:24:44 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 Jan 2019 16:24:42 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 16 Jan 2019 16:24:40 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0GGOdfA66322478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Jan 2019 16:24:39 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 146A14204C; Wed, 16 Jan 2019 16:24:39 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E2D734204B; Wed, 16 Jan 2019 16:24:36 +0000 (GMT) Received: from oc1548405160.ibm.com (unknown [9.85.72.239]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 16 Jan 2019 16:24:36 +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, ravi.bangoria@linux.ibm.com Subject: [PATCH] perf scripts python: Add Python 3 support to stat-cpi.py Date: Wed, 16 Jan 2019 21:53:42 +0530 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1547655825-28754-1-git-send-email-s1seetee@linux.vnet.ibm.com> References: <1547655825-28754-1-git-send-email-s1seetee@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19011616-0028-0000-0000-0000033A0BFB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19011616-0029-0000-0000-000023F733C7 Message-Id: <1547655825-28754-14-git-send-email-s1seetee@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-16_06:,, 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-1901160132 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