perf tools: Put proper period for for samples without PERIOD sample_type
commitbc5290869d0a7f7abbde76ac95a7f7b6f5d7bb7b
authorJiri Olsa <jolsa@redhat.com>
Mon, 3 Feb 2014 11:44:41 +0000 (3 12:44 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Feb 2014 12:34:46 +0000 (18 09:34 -0300)
treed24f4d177fdd40dafa62ce171c5d1c9e5f26bb7f
parent106395dfda0397a6a88cc309bb7beb1fdf2ed798
perf tools: Put proper period for for samples without PERIOD sample_type

We use PERF_SAMPLE_PERIOD sample type only for frequency
setup -F (default) option. The -c does not need store period,
because it's always the same.

In -c case the report code uses '1' as  period. Fixing
it to perf_event_attr::sample_period.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1391427883-13443-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c