]> git.baikalelectronics.ru Git - kernel.git/commit
perf auxtrace: Fix 'instructions' period of zero
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 25 Sep 2015 13:15:32 +0000 (16:15 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Sep 2015 18:50:56 +0000 (15:50 -0300)
commit23f73a6980491ad69abfbf6e6443c73ad14ff291
treef408293ffc2917899760f41ad048c42b658ee267
parentfd5d6ee9c9a837aff045983b7dcf5e1f23cf02c0
perf auxtrace: Fix 'instructions' period of zero

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".

In the case of Intel PT that is the same as a period of 1 and
a unit of 'instructions' (i.e. --itrace=i1i).

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-2-git-send-email-adrian.hunter@intel.com
[ Add a few lines describing this in the Documentation/intel-pt.txt file ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/intel-pt.txt
tools/perf/util/auxtrace.c
tools/perf/util/intel-pt.c