Lines Matching refs:evswitch
8 bool evswitch__discard(struct evswitch *evswitch, struct evsel *evsel) in evswitch__discard() argument
10 if (evswitch->on && evswitch->discarding) { in evswitch__discard()
11 if (evswitch->on != evsel) in evswitch__discard()
14 evswitch->discarding = false; in evswitch__discard()
16 if (!evswitch->show_on_off_events) in evswitch__discard()
22 if (evswitch->off && !evswitch->discarding) { in evswitch__discard()
23 if (evswitch->off != evsel) in evswitch__discard()
26 evswitch->discarding = true; in evswitch__discard()
28 if (!evswitch->show_on_off_events) in evswitch__discard()
42 int evswitch__init(struct evswitch *evswitch, struct evlist *evlist, FILE *fp) in evswitch__init() argument
44 if (evswitch->on_name) { in evswitch__init()
45 evswitch->on = evlist__find_evsel_by_str(evlist, evswitch->on_name); in evswitch__init()
46 if (evswitch->on == NULL) { in evswitch__init()
47 evswitch__fprintf_enoent(fp, "on", evswitch->on_name); in evswitch__init()
50 evswitch->discarding = true; in evswitch__init()
53 if (evswitch->off_name) { in evswitch__init()
54 evswitch->off = evlist__find_evsel_by_str(evlist, evswitch->off_name); in evswitch__init()
55 if (evswitch->off == NULL) { in evswitch__init()
56 evswitch__fprintf_enoent(fp, "off", evswitch->off_name); in evswitch__init()