Lines Matching refs:evswitch
7 bool evswitch__discard(struct evswitch *evswitch, struct evsel *evsel) in evswitch__discard() argument
9 if (evswitch->on && evswitch->discarding) { in evswitch__discard()
10 if (evswitch->on != evsel) in evswitch__discard()
13 evswitch->discarding = false; in evswitch__discard()
15 if (!evswitch->show_on_off_events) in evswitch__discard()
21 if (evswitch->off && !evswitch->discarding) { in evswitch__discard()
22 if (evswitch->off != evsel) in evswitch__discard()
25 evswitch->discarding = true; in evswitch__discard()
27 if (!evswitch->show_on_off_events) in evswitch__discard()
41 int evswitch__init(struct evswitch *evswitch, struct evlist *evlist, FILE *fp) in evswitch__init() argument
43 if (evswitch->on_name) { in evswitch__init()
44 evswitch->on = evlist__find_evsel_by_str(evlist, evswitch->on_name); in evswitch__init()
45 if (evswitch->on == NULL) { in evswitch__init()
46 evswitch__fprintf_enoent(fp, "on", evswitch->on_name); in evswitch__init()
49 evswitch->discarding = true; in evswitch__init()
52 if (evswitch->off_name) { in evswitch__init()
53 evswitch->off = evlist__find_evsel_by_str(evlist, evswitch->off_name); in evswitch__init()
54 if (evswitch->off == NULL) { in evswitch__init()
55 evswitch__fprintf_enoent(fp, "off", evswitch->off_name); in evswitch__init()