From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932838AbbLWQEx (ORCPT ); Wed, 23 Dec 2015 11:04:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48401 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932553AbbLWQEv (ORCPT ); Wed, 23 Dec 2015 11:04:51 -0500 Date: Wed, 23 Dec 2015 17:04:48 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , David Ahern , Ingo Molnar , Peter Zijlstra , "Liang, Kan" Subject: Re: [PATCH 8/8] perf script: Add stat-cpi.py script Message-ID: <20151223160448.GC14636@krava.brq.redhat.com> References: <1450799014-31469-1-git-send-email-jolsa@kernel.org> <1450799014-31469-9-git-send-email-jolsa@kernel.org> <20151223134420.GD23199@danjae.kornet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151223134420.GD23199@danjae.kornet> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 23, 2015 at 10:44:20PM +0900, Namhyung Kim wrote: SNIP > > $ perf stat -e cycles,instructions -a -I 1000 record sleep 3 | perf script -s ./scripts/python/stat-cpi.py > > 1.000202: cpu -1, thread -1 -> cpi 1.035091 (940778881/908885530) > > 2.000392: cpu -1, thread -1 -> cpi 1.442600 (627493992/434974455) > > 3.000545: cpu -1, thread -1 -> cpi 1.353612 (741463930/547766890) > > 3.000622: cpu -1, thread -1 -> cpi 2.642110 (784083/296764) > > > > Tested-by: Kan Liang > > Link: http://lkml.kernel.org/n/tip-15vwwb4yea15wzz6bqbxdpc0@git.kernel.org > > Signed-off-by: Jiri Olsa > > --- > > tools/perf/scripts/python/stat-cpi.py | 77 +++++++++++++++++++++++++++++++++++ > > 1 file changed, 77 insertions(+) > > create mode 100644 tools/perf/scripts/python/stat-cpi.py > > > > diff --git a/tools/perf/scripts/python/stat-cpi.py b/tools/perf/scripts/python/stat-cpi.py > > new file mode 100644 > > index 000000000000..32689a83b6e6 > > --- /dev/null > > +++ b/tools/perf/scripts/python/stat-cpi.py > > @@ -0,0 +1,77 @@ > > +#!/bin/python > > It an unusual place IMHO. Wouldn't it be '#!/usr/bin/env python' ? yep, I'll change that thanks, jirka