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