xref: /linux/tools/perf/util/stream.h (revision c79c3c34f75d72a066e292b10aa50fc758c97c89)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_STREAM_H
3 #define __PERF_STREAM_H
4 
5 #include "callchain.h"
6 
7 struct stream {
8 	struct callchain_node	*cnode;
9 	struct callchain_node	*pair_cnode;
10 };
11 
12 struct evsel_streams {
13 	struct stream		*streams;
14 	int			nr_streams_max;
15 	int			nr_streams;
16 	int			evsel_idx;
17 	u64			streams_hits;
18 };
19 
20 struct evlist_streams {
21 	struct evsel_streams	*ev_streams;
22 	int			nr_evsel;
23 };
24 
25 struct evlist;
26 
27 void evlist_streams__delete(struct evlist_streams *els);
28 
29 struct evlist_streams *evlist__create_streams(struct evlist *evlist,
30 					      int nr_streams_max);
31 
32 struct evsel_streams *evsel_streams__entry(struct evlist_streams *els,
33 					   int evsel_idx);
34 
35 void evsel_streams__match(struct evsel_streams *es_base,
36 			  struct evsel_streams *es_pair);
37 
38 void evsel_streams__report(struct evsel_streams *es_base,
39 			   struct evsel_streams *es_pair);
40 
41 #endif /* __PERF_STREAM_H */
42