From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754480AbbIWS5Q (ORCPT ); Wed, 23 Sep 2015 14:57:16 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:59272 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbbIWS5P (ORCPT ); Wed, 23 Sep 2015 14:57:15 -0400 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: sukadev@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 23 Sep 2015 11:55:06 -0700 From: Sukadev Bhattiprolu To: kan.liang@intel.com Cc: acme@kernel.org, jolsa@kernel.org, a.p.zijlstra@chello.nl, mingo@redhat.com, namhyung@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 06/10] perf,tools: option to set counter read interval Message-ID: <20150923185506.GB18843@us.ibm.com> References: <1442931223-51708-1-git-send-email-kan.liang@intel.com> <1442931223-51708-7-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442931223-51708-7-git-send-email-kan.liang@intel.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15092318-0017-0000-0000-00000E1831D0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kan.liang@intel.com [kan.liang@intel.com] wrote: | From: Kan Liang | | Add a timer to read counter regularly. Option --counter-read-interval | can be used to set the interval. | Only read counter statistics at the beginning and the end is not enough. | Sometimes, we need fine granularity to do sophisticated analysis. For | example,10-20ms is required to do sophisticated bandwidth analysis. | | Signed-off-by: Kan Liang | --- | tools/perf/Documentation/perf-record.txt | 8 +++++++ | tools/perf/builtin-record.c | 37 ++++++++++++++++++++++++++++++++ | 2 files changed, 45 insertions(+) | | diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt | index 2e9ce77..c1d9024 100644 | --- a/tools/perf/Documentation/perf-record.txt | +++ b/tools/perf/Documentation/perf-record.txt | @@ -308,6 +308,14 @@ This option sets the time out limit. The default value is 500 ms. | Record context switch events i.e. events of type PERF_RECORD_SWITCH or | PERF_RECORD_SWITCH_CPU_WIDE. | | +--counter-read-interval:: | +Sets the interval to do counter read regularly. This option is only valid How about "Sets the interval at which the counter should be read"? | +with counter read event (:C). This option is disabled by default. It means | +that the event counter can only be read at the beginning and the end. Should this last sentence be: "When this option is disabled, the event counter can only be read at the beginning and the end?" | +This option could be used when we need fine granularity to do sophisticated | +analysis. For example, 10-20ms is required to do sophisticated memory | +bandwidth analysis. I guess this is independent of the sampling frequency (perf-record -F)? IOW, is the need for --counter-read-interval so we can sample at one frequency, but read the counter values/statistics at a different frequency? Sukadev