Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1710688imu; Thu, 17 Jan 2019 01:54:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN5fOYSJMdLf3OINZm3PL6NpJacy36scfkSnkgQIxZSmAGA2IACY3hcpbsJkQPbUT1oH3vrf X-Received: by 2002:a17:902:14e:: with SMTP id 72mr14398993plb.287.1547718847938; Thu, 17 Jan 2019 01:54:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547718847; cv=none; d=google.com; s=arc-20160816; b=eXszjBVqsGxH1pBJxksI0El7dhh9gT2NvH2u7DQXzo6DHqb3CXPEAN5AP9KwHCqUSl 2SZbUMS9W37hIUSRhNAisCfhhr15+w9OA0Z+J0qzG2byrCPIJpgueWth45ybwhEpySQY jSvG8mP1JkSIVCgiAhM+mYnMcFRUYhfYOi4bpfX1ZFMEdlN31KQQ0JuHiXJb+OelozSa mTUyZ0uWMcHUVxpL1Q0ba8BYlDGRJKAfpCnaArbs278C01yGRnxFhAqMIYYjPi66cB78 nPeLifkUOuZPOpuf5ciyciBry0IzKbz8QWx0MF/pnPZsVUYTEXwRqmRExxEoN2JwPV0x aXjw== 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=m/+xNtzjISa0afHKC9LCItJJOdiwEA0ct8FM0MaYYjQ=; b=X/nvxiO0Tbxty08cR+3IYGpW6Z34ihCHzhCmtGesOJ/5T5lO74FzecUh053k6Jzq98 WK05fZrSFqoD1tk9n8Ew4zRocFBAlWm3ToW+qnq9f5gIR7O7Hlm0qepl3ueKa4kbuAYC aBawJy4ueyN9fwMpg7j9sHRRBH7aAuJ4FSzU+NGdj9GMv1zOJyVRMZE0HYWS5cBaOOxY eW32Z6ail1wB1LQiShP98AsHHZuZav4/TpABwn+u55CK0F85QO1fQLwFXxuPdRVTPM1+ kVDbBUytpNXkSVjGXfdaX5/WM4HIJ3gnCpSHDDsxXhOY6IPbq0lD7wRJo9Ieky4emL3R cYSA== 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 b6si1197952pgd.292.2019.01.17.01.53.52; Thu, 17 Jan 2019 01:54:07 -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 S1729200AbfAQJqX (ORCPT + 99 others); Thu, 17 Jan 2019 04:46:23 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38584 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbfAQJqT (ORCPT ); Thu, 17 Jan 2019 04:46:19 -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 x0H9iEkr121911 for ; Thu, 17 Jan 2019 04:46:18 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q2qb0834t-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Jan 2019 04:46:18 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Jan 2019 09:46:15 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) 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:12 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0H9kBWU65011898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Jan 2019 09:46:11 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88D0411C04A; Thu, 17 Jan 2019 09:46:11 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3394411C058; Thu, 17 Jan 2019 09:46:10 +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:10 +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 net_dropmonitor.py Date: Thu, 17 Jan 2019 15:15:37 +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-4275-0000-0000-000003005E5D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19011709-4276-0000-0000-0000380E823C Message-Id: <1547718344-27382-10-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 net_dropmonitor.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/net_dropmonitor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py index a150164..88fe4a2 100755 --- a/tools/perf/scripts/python/net_dropmonitor.py +++ b/tools/perf/scripts/python/net_dropmonitor.py @@ -1,5 +1,6 @@ # Monitor the system for dropped packets and proudce a report of drop locations and counts # SPDX-License-Identifier: GPL-2.0 +from __future__ import print_function import os import sys @@ -50,19 +51,19 @@ def get_sym(sloc): return (None, 0) def print_drop_table(): - print "%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT") + print("%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT")) for i in drop_log.keys(): (sym, off) = get_sym(i) if sym == None: sym = i - print "%25s %25s %25s" % (sym, off, drop_log[i]) + print("%25s %25s %25s" % (sym, off, drop_log[i])) def trace_begin(): - print "Starting trace (Ctrl-C to dump results)" + print("Starting trace (Ctrl-C to dump results)") def trace_end(): - print "Gathering kallsyms data" + print("Gathering kallsyms data") get_kallsyms_table() print_drop_table() -- 1.8.3.1