Received: by 10.223.185.116 with SMTP id b49csp1856562wrg; Thu, 15 Feb 2018 02:45:41 -0800 (PST) X-Google-Smtp-Source: AH8x224+rsxbzzwWJkoZyQTceP8lTduDWSJ2r8g5zmBbF96KRFosvRvFlhJbj8FT2YrlATl1x3z4 X-Received: by 2002:a17:902:6b83:: with SMTP id p3-v6mr2129315plk.18.1518691540931; Thu, 15 Feb 2018 02:45:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518691540; cv=none; d=google.com; s=arc-20160816; b=WLThCUIV2u/gcKHD5RkS3o8AJzNCU1wcI6DjEV2hUOcqWZLOoIv0u8VHot0Wr4EoI9 qh7NF+9EJJpdwxON5X2dRHxqbx4jF8R5Of3fwmO14CkKY/5UCfvGdafDzeCoajR/5MhA X8szHjDYEEE5P8XkZWC18s3FtMmNypJ6KPMImAckIvturuBC42mVGmL6N1DXvURmQWx0 LFI+RyW9Cp8eq7klYKyGGXTWFgvIqQ6ULG0WAqt1z0Bjqk2prqHKs7Uk6Zv0zppKEGHc H+Nc5y0pZ6hFjgBJ/gbpkBqVrqLULkAsjJqxJxm62kUpQA4jVCOlUIXhuazAwWxWnllx 6OIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=91yrxJIHbplMWvKD3GjSRHGpv4TiXSbXud4HIU/m8k4=; b=SDfBsXo8fsLP+FZxdya572U0OzQS2qbvT16aXIUG+lt2UyzU/EunBmNkm/9N7z3OUV ilfP7yMwTN9XyrYDfeRGokxdXqqyklA9w4VSKT0eIq5K8hMxKex5GJW8ctDk74pCVO+y 0BI0tLGOWP4+Z88mySXfKYkd96LsVu31Ypf6BxKsSQEWaPMxeNqQRtXjZF3aBq4ZHNTZ WS+KrqSdFwSAvFNOO4FD+rsyFjk0uviO0s5GPgHZns6aiVb6Hqrlnxcyo/beKd+z6jHC HkFYLTTkd7LqgfnsRnnh0mhXIx/e02OdOVuvG4GtWoSPwfeWv5rJekiBV2Z+PbDpel4u U2dw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si9350073pfl.53.2018.02.15.02.45.25; Thu, 15 Feb 2018 02:45:40 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967074AbeBOKou (ORCPT + 99 others); Thu, 15 Feb 2018 05:44:50 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60882 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755304AbeBOKos (ORCPT ); Thu, 15 Feb 2018 05:44:48 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99AE640FB630; Thu, 15 Feb 2018 10:44:47 +0000 (UTC) Received: from krava (unknown [10.43.17.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8CC82024CA8; Thu, 15 Feb 2018 10:44:42 +0000 (UTC) Date: Thu, 15 Feb 2018 11:44:42 +0100 From: Jiri Olsa To: =?utf-8?B?56a56Iif6ZSu?= Cc: Peter Zijlstra , mingo@redhat.com, Alexander Shishkin , Jiri Olsa , David Ahern , Namhyung Kim , Milian Wolff , Arnaldo Carvalho de Melo , Wind Yu , Adrian Hunter , Wang Nan , Kan.liang@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, acme@redhat.com Subject: Re: [PATCH v4 0/2] perf stat: Add interval-count and time support Message-ID: <20180215104442.GA12714@krava> References: <1517217923-8302-1-git-send-email-ufo19890607@gmail.com> <20180129102558.GA14925@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 15 Feb 2018 10:44:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 15 Feb 2018 10:44:47 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 15, 2018 at 05:33:07PM +0800, 禹舟键 wrote: > PING > > 2018-01-29 18:25 GMT+08:00 Jiri Olsa : Arnaldo, could you pelase check on this? thanks, jirka > > > On Mon, Jan 29, 2018 at 10:25:21AM +0100, ufo19890607 wrote: > > > From: yuzhoujian > > > > > > Introduce two new options for perf stat and update perf-stat > > documentation > > > accordingly. > > > > > > The interval-count option can be used to print counts for fixed number of > > > times, and it should be used specifically with "-I" option. > > > > > > Show below is the output of the interval-count option for perf stat. > > > > > > $ perf stat -I 1000 --interval-count 2 -e cycles -a > > > # time counts unit events > > > 1.002827089 93,884,870 cycles > > > 2.004231506 56,573,446 cycles > > > > > > The time option can be used to print counts after a period of time, and > > it > > > should not be used with "-I" option. > > > > > > Show below is the output of the time option for perf stat. > > > > > > $ perf stat --time 2000 -e cycles -a > > > Performance counter stats for 'system wide': > > > > > > 157,260,423 cycles > > > > > > 2.003060766 seconds time elapsed > > > > > > yuzhoujian (2): > > > perf stat: Add support to print counts for fixed times > > > perf stat: Add support to print counts after a period of time > > > > > > Changes since v3: > > > - merge interval_count check and times check to one line. > > > - fix the wrong indent in stat.h > > > - use stat_config.times instead of 'times' in cmd_stat function. > > > > Acked-by: Jiri Olsa > > > > thanks, > > jirka > > > > > > > > Changes since v2: > > > - modify the time check in __run_perf_stat func to keep some consistency > > > with the workload case. > > > - add the warning when the time is set between 10ms to 100ms. > > > - add the pr_err when the time is set below 10ms. > > > > > > Changes since v1: > > > - change the name of the new option "times-print" to "interval-count". > > > - keep the interval-count option interval specifically. > > > > > > > > > tools/perf/Documentation/perf-stat.txt | 10 +++++++ > > > tools/perf/builtin-stat.c | 53 > > ++++++++++++++++++++++++++++++++-- > > > tools/perf/util/stat.h | 2 ++ > > > 3 files changed, 62 insertions(+), 3 deletions(-) > > > > > > -- > > > 2.14.1 > > > > >