diff options
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index caa224522fea..fff66741f18d 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1156,6 +1156,18 @@ size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp) | |||
1156 | return ret; | 1156 | return ret; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session, | ||
1160 | unsigned int type) | ||
1161 | { | ||
1162 | struct perf_evsel *pos; | ||
1163 | |||
1164 | list_for_each_entry(pos, &session->evlist->entries, node) { | ||
1165 | if (pos->attr.type == type) | ||
1166 | return pos; | ||
1167 | } | ||
1168 | return NULL; | ||
1169 | } | ||
1170 | |||
1159 | void perf_session__print_symbols(union perf_event *event, | 1171 | void perf_session__print_symbols(union perf_event *event, |
1160 | struct perf_sample *sample, | 1172 | struct perf_sample *sample, |
1161 | struct perf_session *session) | 1173 | struct perf_session *session) |