public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] perf tools: Put proper period for for samples without PERIOD sample_type
@ 2014-02-03 11:44 Jiri Olsa
  2014-02-03 11:44 ` [PATCH 2/3] perf tools: Add call-graph option support into .perfconfig Jiri Olsa
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jiri Olsa @ 2014-02-03 11:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jiri Olsa, Corey Ashford, David Ahern, Ingo Molnar, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo,
	Andi Kleen, Adrian Hunter

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: 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>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/evsel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 55407c5..c6f8ce9 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1220,7 +1220,7 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
 	memset(data, 0, sizeof(*data));
 	data->cpu = data->pid = data->tid = -1;
 	data->stream_id = data->id = data->time = -1ULL;
-	data->period = 1;
+	data->period = evsel->attr.sample_period;
 	data->weight = 0;
 
 	if (event->header.type != PERF_RECORD_SAMPLE) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-02-22 17:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03 11:44 [PATCH 1/3] perf tools: Put proper period for for samples without PERIOD sample_type Jiri Olsa
2014-02-03 11:44 ` [PATCH 2/3] perf tools: Add call-graph option support into .perfconfig Jiri Olsa
2014-02-22 17:56   ` [tip:perf/core] " tip-bot for Jiri Olsa
2014-02-03 11:44 ` [PATCH 3/3] perf tools: Add readable output for callchain debug Jiri Olsa
2014-02-03 15:09   ` Arnaldo Carvalho de Melo
2014-02-03 16:39     ` Jiri Olsa
2014-02-22 17:56   ` [tip:perf/core] perf record: " tip-bot for Jiri Olsa
2014-02-05  1:27 ` [PATCH 1/3] perf tools: Put proper period for for samples without PERIOD sample_type Namhyung Kim
2014-02-05 14:33   ` Jiri Olsa
2014-02-06  6:24     ` Namhyung Kim
2014-02-22 17:56 ` [tip:perf/core] " tip-bot for Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox