Received: by 10.192.165.148 with SMTP id m20csp4785880imm; Tue, 8 May 2018 14:29:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpYCvDcpzjfzZjTKLqQA+SyCYch552rtsBUGowT9b3rWKX28pIImwE3lLP4ogOStJrSLjAv X-Received: by 2002:a17:902:380c:: with SMTP id l12-v6mr31403570plc.19.1525814976876; Tue, 08 May 2018 14:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525814976; cv=none; d=google.com; s=arc-20160816; b=fzea7xG8OP5wm+PKc+mfuXbz21YICmom8iciXkr28dP3tqveblmfpJPe9Sh5NHrHmt eSX9cX7ToUg71MbWo+YJd+DK5DrIM8WGurOeA8oh9/aHW1vJelaLIQYLI7izS1wkygyk tFt11x9dZW57uJA+5EHX0qtLGXzUlrR7Y3fwCTOv4ISqT8NGlUYK9CYcLMqWfPNMO4oM aI7TMOhjAzAHr3CetknOGWATd0Smun+j9oxzRi0LKdlv8+D4oFIaVJgoEELO2sLFzy5X CkXP/1FIKWeQ+2Afa8yjBzaE+uMc2mX1YIEVuFJwemUCFj8SLOwAb3z/ch+6+PkKnAbS 7UJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=Qa8EG051dQ4evDM9Gv8KZPxXwDn7W0Gm7qznKNgKOYc=; b=jxqj2PaVfV0m9xxmBKhwKwCTyDAniLcxxqBwTnhlwDwx0gFOgBCXdNbCFzTEtZnEbb oO1K5Fb+84rdEx+IGWwkgQph0GXMz6G3DgDW6mMjZk5GvQcSDxb+nZymE73fleefKmT0 wOZb0SA7mBYbA5bgJxGnVXZX/ZEVT9wzP0y6dcF3d8wDOuFGRSsGwh58BFTRH36iDUFy OnZsnY3i77245/N0rrq/+wE47u9nyy0A4YCUZzkeLoxm0snoPO2V8m5nb8tpMNMDEyaf +jCq7rMhMoOz9ai//WdVvZD01/1VFlNn40sO3NeMinIEb7x6IBRFZRfFJYn4nDVYA6pW J3JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jcline.org header.s=rdybrs3533vx7mghocfwl3vdwgpl2v5u header.b=GGLtT2no; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=G81nTFEe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w71-v6si12795879pgd.1.2018.05.08.14.29.22; Tue, 08 May 2018 14:29:36 -0700 (PDT) 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; dkim=pass header.i=@jcline.org header.s=rdybrs3533vx7mghocfwl3vdwgpl2v5u header.b=GGLtT2no; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=G81nTFEe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932716AbeEHV2h (ORCPT + 99 others); Tue, 8 May 2018 17:28:37 -0400 Received: from a8-57.smtp-out.amazonses.com ([54.240.8.57]:37892 "EHLO a8-57.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756050AbeEHV1w (ORCPT ); Tue, 8 May 2018 17:27:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=rdybrs3533vx7mghocfwl3vdwgpl2v5u; d=jcline.org; t=1525814871; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=JGEFkO4+m3G1H0GdQw9XkErBaapie02rXm/83hRMwqs=; b=GGLtT2no4uQ4lm4uA4rR1gC5sSRQSC/e6BJ4jTIvCYrpFzYPbYKRjzx6/5lHo1Da Q65b8ZsHqdRTAGS3xKxhiW3dT6s9zkZ67oQGIMHLp+FrToWTaRzQBxqrWw78OiNE4kS R48SdMlgKrUekobZE8MvxwJRUy7oQdX3TxmiDjq0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1525814871; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=JGEFkO4+m3G1H0GdQw9XkErBaapie02rXm/83hRMwqs=; b=G81nTFEeQaFAcY4snmqPq01tX8OwWYo86wycrPZisEbrHv8SkwkzhkjrAWZA3RCs zLqdZrJrj+UNzj8YMU5GlimXEoV+kMTA+NtTj2bjlytNrVgb+go/u17YKhVNlX1fNzl pCv6vBMu60ANLY5VM/y/VkjbDfiuZ0yj13BwnCBs= X-Virus-Scanned: amavisd-new at jcline.org From: Jeremy Cline To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Alexander Shishkin , Jiri Olsa , Namhyung Kim , "Herton R . Krzesinski" , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Cline Subject: [PATCH 7/8] perf scripts python: Add Python 3 support to stat-cpi.py Date: Tue, 8 May 2018 21:27:51 +0000 Message-ID: <0100016341a74569-b9ac2ac6-f99b-41ed-be0d-f7cb3c69e6de-000000@email.amazonses.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: X-SES-Outgoing: 2018.05.08-54.240.8.57 Feedback-ID: 1.us-east-1.z18Isoc/FaoPOvCyJyi1mnTt8STwoRuibXVNoUcvG6g=:AmazonSES 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. This should have no functional change. Signed-off-by: Jeremy Cline --- tools/perf/scripts/python/stat-cpi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/scripts/python/stat-cpi.py b/tools/perf/scripts/python/stat-cpi.py index 8410672efb8b..fc53a03da412 100644 --- a/tools/perf/scripts/python/stat-cpi.py +++ b/tools/perf/scripts/python/stat-cpi.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # SPDX-License-Identifier: GPL-2.0 +from __future__ import print_function + data = {} times = [] threads = [] @@ -59,7 +61,8 @@ 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 -- 2.17.0