diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-sched.c | 5 | ||||
-rw-r--r-- | tools/perf/builtin-timechart.c | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 5177964943e7..d51af0beab13 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include "util/util.h" | 4 | #include "util/util.h" |
5 | #include "util/cache.h" | 5 | #include "util/cache.h" |
6 | #include "util/evsel.h" | ||
6 | #include "util/symbol.h" | 7 | #include "util/symbol.h" |
7 | #include "util/thread.h" | 8 | #include "util/thread.h" |
8 | #include "util/header.h" | 9 | #include "util/header.h" |
@@ -1603,12 +1604,12 @@ static void process_raw_event(union perf_event *raw_event __used, | |||
1603 | 1604 | ||
1604 | static int process_sample_event(union perf_event *event, | 1605 | static int process_sample_event(union perf_event *event, |
1605 | struct perf_sample *sample, | 1606 | struct perf_sample *sample, |
1606 | struct perf_evsel *evsel __used, | 1607 | struct perf_evsel *evsel, |
1607 | struct perf_session *session) | 1608 | struct perf_session *session) |
1608 | { | 1609 | { |
1609 | struct thread *thread; | 1610 | struct thread *thread; |
1610 | 1611 | ||
1611 | if (!(session->sample_type & PERF_SAMPLE_RAW)) | 1612 | if (!(evsel->attr.sample_type & PERF_SAMPLE_RAW)) |
1612 | return 0; | 1613 | return 0; |
1613 | 1614 | ||
1614 | thread = perf_session__findnew(session, sample->pid); | 1615 | thread = perf_session__findnew(session, sample->pid); |
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; |