From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933989AbbI1ORB (ORCPT ); Mon, 28 Sep 2015 10:17:01 -0400 Received: from mail.kernel.org ([198.145.29.136]:60658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933961AbbI1OQ7 (ORCPT ); Mon, 28 Sep 2015 10:16:59 -0400 Date: Mon, 28 Sep 2015 11:16:56 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: Jiri Olsa , linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/25] perf auxtrace: Fix 'instructions' period of zero Message-ID: <20150928141656.GF6022@kernel.org> References: <1443186956-18718-1-git-send-email-adrian.hunter@intel.com> <1443186956-18718-2-git-send-email-adrian.hunter@intel.com> <20150928141216.GE6022@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150928141216.GE6022@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Sep 28, 2015 at 11:12:16AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Sep 25, 2015 at 04:15:32PM +0300, Adrian Hunter escreveu: > > Instruction tracing options (i.e. --itrace) include an option for > > sampling instructions at an arbitrary period. e.g. > > > > --itrace=i10us > > > > means make an 'instructions' sample for every 10us of trace. > > > > Currently the logic does not distinguish between a period of > > zero and no period being specified at all, so it gets treated > > as the default period which is 100000. That doesn't really > > make sense. > > > > Fix it so that zero period is accepted and treated as meaning > > "as often as possible". > > Don't we have to update the documentation for this? > > > In the case of Intel PT that is the same as a period of 1 and > > a unit of 'instructions' (i.e. --itrace=i1i). I.e. may I fold the following patch into this one? Should we update the per tool man page? diff --git a/tools/perf/Documentation/intel-pt.txt b/tools/perf/Documentation/intel-pt.txt index 4a0501d7a3b4..05707d9bfdda 100644 --- a/tools/perf/Documentation/intel-pt.txt +++ b/tools/perf/Documentation/intel-pt.txt @@ -722,6 +722,11 @@ on the sample is *not* adjusted and reflects the last known value of TSC. For Intel PT, the default period is 100us. +Setting it to a zero period means "as often as possible". + +In the case of Intel PT that is the same as a period of 1 and a unit of +'instructions' (i.e. --itrace=i1i). + Also the call chain size (default 16, max. 1024) for instructions or transactions events can be specified. e.g.