diff options
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 5b8601df2392..7d07324db41c 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -16,19 +16,6 @@ | |||
16 | #include "cpumap.h" | 16 | #include "cpumap.h" |
17 | #include "event-parse.h" | 17 | #include "event-parse.h" |
18 | 18 | ||
19 | int perf_session__parse_sample(struct perf_session *session, | ||
20 | const union perf_event *event, | ||
21 | struct perf_sample *sample) | ||
22 | { | ||
23 | struct perf_evsel *first; | ||
24 | first = list_entry(session->evlist->entries.next, struct perf_evsel, node); | ||
25 | |||
26 | return perf_event__parse_sample(event, first->attr.sample_type, | ||
27 | first->sample_size, | ||
28 | first->attr.sample_id_all, sample, | ||
29 | session->header.needs_swap); | ||
30 | } | ||
31 | |||
32 | int perf_session__synthesize_sample(struct perf_session *session, | 19 | int perf_session__synthesize_sample(struct perf_session *session, |
33 | union perf_event *event, | 20 | union perf_event *event, |
34 | const struct perf_sample *sample) | 21 | const struct perf_sample *sample) |
@@ -692,7 +679,8 @@ static void flush_sample_queue(struct perf_session *s, | |||
692 | if (iter->timestamp > limit) | 679 | if (iter->timestamp > limit) |
693 | break; | 680 | break; |
694 | 681 | ||
695 | ret = perf_session__parse_sample(s, iter->event, &sample); | 682 | ret = perf_evlist__parse_sample(s->evlist, iter->event, &sample, |
683 | s->header.needs_swap); | ||
696 | if (ret) | 684 | if (ret) |
697 | pr_err("Can't parse sample, err = %d\n", ret); | 685 | pr_err("Can't parse sample, err = %d\n", ret); |
698 | else | 686 | else |
@@ -1103,7 +1091,8 @@ static int perf_session__process_event(struct perf_session *session, | |||
1103 | /* | 1091 | /* |
1104 | * For all kernel events we get the sample data | 1092 | * For all kernel events we get the sample data |
1105 | */ | 1093 | */ |
1106 | ret = perf_session__parse_sample(session, event, &sample); | 1094 | ret = perf_evlist__parse_sample(session->evlist, event, &sample, |
1095 | session->header.needs_swap); | ||
1107 | if (ret) | 1096 | if (ret) |
1108 | return ret; | 1097 | return ret; |
1109 | 1098 | ||