Lines Matching refs:evsel

27 #include <perf/evsel.h>
1833 struct evsel *evsel;
1844 evlist__for_each_entry(evlist, evsel) {
1847 nr += evsel->core.ids;
1867 evlist__for_each_entry(evlist, evsel) {
1872 for (j = 0; j < evsel->core.ids; j++, i++) {
1889 e->id = evsel->core.id[j];
1988 int perf_event__synthesize_event_update_unit(struct perf_tool *tool, struct evsel *evsel,
1991 size_t size = strlen(evsel->unit);
1995 ev = event_update_event__new(size + 1, PERF_EVENT_UPDATE__UNIT, evsel->core.id[0]);
1999 strlcpy(ev->unit, evsel->unit, size + 1);
2005 int perf_event__synthesize_event_update_scale(struct perf_tool *tool, struct evsel *evsel,
2012 ev = event_update_event__new(sizeof(*ev_data), PERF_EVENT_UPDATE__SCALE, evsel->core.id[0]);
2016 ev->scale.scale = evsel->scale;
2022 int perf_event__synthesize_event_update_name(struct perf_tool *tool, struct evsel *evsel,
2026 size_t len = strlen(evsel__name(evsel));
2029 ev = event_update_event__new(len + 1, PERF_EVENT_UPDATE__NAME, evsel->core.id[0]);
2033 strlcpy(ev->name, evsel->name, len + 1);
2039 int perf_event__synthesize_event_update_cpus(struct perf_tool *tool, struct evsel *evsel,
2042 struct synthesize_cpu_map_data syn_data = { .map = evsel->core.own_cpus };
2054 ev->id = evsel->core.id[0];
2065 struct evsel *evsel;
2068 evlist__for_each_entry(evlist, evsel) {
2069 err = perf_event__synthesize_attr(tool, &evsel->core.attr, evsel->core.ids,
2070 evsel->core.id, process);
2080 static bool has_unit(struct evsel *evsel)
2082 return evsel->unit && *evsel->unit;
2085 static bool has_scale(struct evsel *evsel)
2087 return evsel->scale != 1;
2093 struct evsel *evsel;
2100 evlist__for_each_entry(evsel_list, evsel) {
2101 if (!evsel->supported)
2107 if (has_unit(evsel)) {
2108 err = perf_event__synthesize_event_update_unit(tool, evsel, process);
2110 pr_err("Couldn't synthesize evsel unit.\n");
2115 if (has_scale(evsel)) {
2116 err = perf_event__synthesize_event_update_scale(tool, evsel, process);
2118 pr_err("Couldn't synthesize evsel evsel.\n");
2123 if (evsel->core.own_cpus) {
2124 err = perf_event__synthesize_event_update_cpus(tool, evsel, process);
2126 pr_err("Couldn't synthesize evsel cpus.\n");
2136 err = perf_event__synthesize_event_update_name(tool, evsel, process);
2138 pr_err("Couldn't synthesize evsel name.\n");