diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-16 14:02:54 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 07:38:14 -0500 |
commit | e3f42609628a20da92ecbc2d81053cc82c90a071 (patch) | |
tree | 5fce687fcc9fb9b3060c5bb129936ac725da0a19 /tools/perf/builtin-timechart.c | |
parent | 246d4ce8107ea16521384c8b2a8fcff354ef2b7c (diff) |
perf tools: Use evsel->attr.sample_type instead of session->sample_type
Eventually session->sample_type will go away as we want to support
multiple sample types per session, so use it from the evsel which is a
step in that direction.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-0vwdpjcwbjezw459lw5n3ew1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r-- | tools/perf/builtin-timechart.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index aa26f4d66d10..3fc52b1aa430 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "util/color.h" | 19 | #include "util/color.h" |
20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
21 | #include "util/cache.h" | 21 | #include "util/cache.h" |
22 | #include "util/evsel.h" | ||
22 | #include <linux/rbtree.h> | 23 | #include <linux/rbtree.h> |
23 | #include "util/symbol.h" | 24 | #include "util/symbol.h" |
24 | #include "util/callchain.h" | 25 | #include "util/callchain.h" |
@@ -488,12 +489,12 @@ static void sched_switch(int cpu, u64 timestamp, struct trace_entry *te) | |||
488 | 489 | ||
489 | static int process_sample_event(union perf_event *event __used, | 490 | static int process_sample_event(union perf_event *event __used, |
490 | struct perf_sample *sample, | 491 | struct perf_sample *sample, |
491 | struct perf_evsel *evsel __used, | 492 | struct perf_evsel *evsel, |
492 | struct perf_session *session) | 493 | struct perf_session *session __used) |
493 | { | 494 | { |
494 | struct trace_entry *te; | 495 | struct trace_entry *te; |
495 | 496 | ||
496 | if (session->sample_type & PERF_SAMPLE_TIME) { | 497 | if (evsel->attr.sample_type & PERF_SAMPLE_TIME) { |
497 | if (!first_time || first_time > sample->time) | 498 | if (!first_time || first_time > sample->time) |
498 | first_time = sample->time; | 499 | first_time = sample->time; |
499 | if (last_time < sample->time) | 500 | if (last_time < sample->time) |
@@ -501,7 +502,7 @@ static int process_sample_event(union perf_event *event __used, | |||
501 | } | 502 | } |
502 | 503 | ||
503 | te = (void *)sample->raw_data; | 504 | te = (void *)sample->raw_data; |
504 | if (session->sample_type & PERF_SAMPLE_RAW && sample->raw_size > 0) { | 505 | if ((evsel->attr.sample_type & PERF_SAMPLE_RAW) && sample->raw_size > 0) { |
505 | char *event_str; | 506 | char *event_str; |
506 | #ifdef SUPPORT_OLD_POWER_EVENTS | 507 | #ifdef SUPPORT_OLD_POWER_EVENTS |
507 | struct power_entry_old *peo; | 508 | struct power_entry_old *peo; |