Lines Matching +full:pm +full:- +full:api

1 // SPDX-License-Identifier: GPL-2.0
11 #include <api/fs/tracing_path.h>
12 #include <api/io.h>
18 #include "build-id.h"
22 #include "parse-events.h"
25 #include "print-events.h"
26 #include "probe-file.h"
73 pcache = probe_cache__new(bid_nd->s, NULL); in print_sdt_events()
76 list_for_each_entry(ent, &pcache->entries, node) { in print_sdt_events()
80 ent->pev.group, ent->pev.event, bid_nd->s); in print_sdt_events()
89 char *bid = strchr(sdt_name->s, '@'); in print_sdt_events()
95 if (last_sdt_name && !strcmp(last_sdt_name, sdt_name->s)) { in print_sdt_events()
100 char *bid2 = strchr(next_sdt_name->s, '@'); in print_sdt_events()
104 if (strcmp(sdt_name->s, next_sdt_name->s) == 0) in print_sdt_events()
110 last_sdt_name = sdt_name->s; in print_sdt_events()
116 if (asprintf(&evt_name, "%s@%s(%.12s)", sdt_name->s, path, bid) < 0) in print_sdt_events()
121 print_cb->print_event(print_state, in print_sdt_events()
125 evt_name ?: sdt_name->s, in print_sdt_events()
161 * Re-run with exclude_kernel set; we don't do that by in is_event_supported()
164 evsel->core.attr.exclude_kernel = 1; in is_event_supported()
173 * Re-run with exclude_guest set; we don't do that by in is_event_supported()
177 evsel->core.attr.exclude_guest = 1; in is_event_supported()
199 if (pmu->is_uncore || pmu->type == PERF_TYPE_SOFTWARE) in print_hwcache_events()
217 ret = parse_events__decode_legacy_cache(name, pmu->type, in print_hwcache_events()
222 pmu->name, name); in print_hwcache_events()
223 print_cb->print_event(print_state, in print_hwcache_events()
225 pmu->name, in print_hwcache_events()
226 pmu->type, in print_hwcache_events()
274 char *alias = strstr(nd->s, " OR "); in print_symbol_events()
280 print_cb->print_event(print_state, in print_symbol_events()
284 nd->s, in print_symbol_events()
296 /** struct mep - RB-tree node for building printing information. */
298 /** nd - RB-tree element. */
317 ret = strcmp(a->metric_group, b->metric_group); in mep_cmp()
321 return strcmp(a->metric_name, b->metric_name); in mep_cmp()
332 return &me->nd; in mep_new()
340 zfree(&me->metric_group); in mep_delete()
364 static int metricgroup__add_to_mep_groups_callback(const struct pmu_metric *pm, in metricgroup__add_to_mep_groups_callback() argument
372 mg = strdup(pm->metric_group ?: pm->metric_name); in metricgroup__add_to_mep_groups_callback()
374 return -ENOMEM; in metricgroup__add_to_mep_groups_callback()
381 me = mep_lookup(groups, g, pm->metric_name); in metricgroup__add_to_mep_groups_callback()
383 me = mep_lookup(groups, pm->metric_name, pm->metric_name); in metricgroup__add_to_mep_groups_callback()
386 me->metric_desc = pm->desc; in metricgroup__add_to_mep_groups_callback()
387 me->metric_long_desc = pm->long_desc; in metricgroup__add_to_mep_groups_callback()
388 me->metric_expr = pm->metric_expr; in metricgroup__add_to_mep_groups_callback()
389 me->metric_threshold = pm->metric_threshold; in metricgroup__add_to_mep_groups_callback()
390 me->metric_unit = pm->unit; in metricgroup__add_to_mep_groups_callback()
391 me->pmu_name = pm->pmu; in metricgroup__add_to_mep_groups_callback()
415 print_cb->print_metric(print_state, in metricgroup__print()
416 me->metric_group, in metricgroup__print()
417 me->metric_name, in metricgroup__print()
418 me->metric_desc, in metricgroup__print()
419 me->metric_long_desc, in metricgroup__print()
420 me->metric_expr, in metricgroup__print()
421 me->metric_threshold, in metricgroup__print()
422 me->metric_unit, in metricgroup__print()
423 me->pmu_name); in metricgroup__print()
441 print_cb->print_event(print_state, in print_events()
456 print_cb->print_event(print_state, in print_events()