Lines Matching defs:evsel
27 #include <perf/evsel.h>
1817 struct evsel *evsel;
1828 evlist__for_each_entry(evlist, evsel) {
1831 nr += evsel->core.ids;
1851 evlist__for_each_entry(evlist, evsel) {
1856 for (j = 0; j < evsel->core.ids; j++, i++) {
1873 e->id = evsel->core.id[j];
1972 int perf_event__synthesize_event_update_unit(struct perf_tool *tool, struct evsel *evsel,
1975 size_t size = strlen(evsel->unit);
1979 ev = event_update_event__new(size + 1, PERF_EVENT_UPDATE__UNIT, evsel->core.id[0]);
1983 strlcpy(ev->unit, evsel->unit, size + 1);
1989 int perf_event__synthesize_event_update_scale(struct perf_tool *tool, struct evsel *evsel,
1996 ev = event_update_event__new(sizeof(*ev_data), PERF_EVENT_UPDATE__SCALE, evsel->core.id[0]);
2000 ev->scale.scale = evsel->scale;
2006 int perf_event__synthesize_event_update_name(struct perf_tool *tool, struct evsel *evsel,
2010 size_t len = strlen(evsel__name(evsel));
2013 ev = event_update_event__new(len + 1, PERF_EVENT_UPDATE__NAME, evsel->core.id[0]);
2017 strlcpy(ev->name, evsel->name, len + 1);
2023 int perf_event__synthesize_event_update_cpus(struct perf_tool *tool, struct evsel *evsel,
2026 struct synthesize_cpu_map_data syn_data = { .map = evsel->core.own_cpus };
2038 ev->id = evsel->core.id[0];
2049 struct evsel *evsel;
2052 evlist__for_each_entry(evlist, evsel) {
2053 err = perf_event__synthesize_attr(tool, &evsel->core.attr, evsel->core.ids,
2054 evsel->core.id, process);
2064 static bool has_unit(struct evsel *evsel)
2066 return evsel->unit && *evsel->unit;
2069 static bool has_scale(struct evsel *evsel)
2071 return evsel->scale != 1;
2077 struct evsel *evsel;
2084 evlist__for_each_entry(evsel_list, evsel) {
2085 if (!evsel->supported)
2091 if (has_unit(evsel)) {
2092 err = perf_event__synthesize_event_update_unit(tool, evsel, process);
2094 pr_err("Couldn't synthesize evsel unit.\n");
2099 if (has_scale(evsel)) {
2100 err = perf_event__synthesize_event_update_scale(tool, evsel, process);
2102 pr_err("Couldn't synthesize evsel evsel.\n");
2107 if (evsel->core.own_cpus) {
2108 err = perf_event__synthesize_event_update_cpus(tool, evsel, process);
2110 pr_err("Couldn't synthesize evsel cpus.\n");
2120 err = perf_event__synthesize_event_update_name(tool, evsel, process);
2122 pr_err("Couldn't synthesize evsel name.\n");