Lines Matching +full:ddr +full:- +full:pmu

2 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <pmu-events/pmu-events.h>
7 #include "util/pmu.h"
27 /* offset=325 */ "dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatc…
32 …ncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event…
33 /* offset=914 */ "event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000UNC_CBO_HYPHE…
34 /* offset=979 */ "event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000UNC_CBO_T…
42 /* offset=1371 */ "sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8…
44 /* offset=1463 */ "sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x0…
50 /* offset=1947 */ "dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\0…
51 /* offset=2011 */ "icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\00…
54 /* offset=2243 */ "DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data…
67 { 325 }, /* dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatch for …
79 { 914 }, /* event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000UNC_CBO_HYPHEN\000 …
80 { 979 }, /* event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000UNC_CBO_TWO_HYP…
81 …ncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event…
128 { 2243 }, /* DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hi…
138 { 1947 }, /* dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000…
139 { 2011 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\…
152 { 1463 }, /* sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x01\0000…
158 { 1371 }, /* sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8\00000…
181 /* Struct used to make the PMU event table implementation opaque to callers. */
187 /* Struct used to make the PMU metric table implementation opaque to callers. */
194 * Map a CPU to its table of PMU events. The CPU is identified by the
195 * cpuid field, which is an arch-specific identifier for the CPU.
196 * The identifier specified in tools/perf/pmu-events/arch/xxx/mapfile
210 * table of PMU events.
257 pe->name = (*p == '\0' ? NULL : p); in decompress_event()
259 pe->topic = (*p == '\0' ? NULL : p); in decompress_event()
261 pe->desc = (*p == '\0' ? NULL : p); in decompress_event()
263 pe->event = (*p == '\0' ? NULL : p); in decompress_event()
265 pe->compat = (*p == '\0' ? NULL : p); in decompress_event()
267 pe->deprecated = *p - '0'; in decompress_event()
269 pe->perpkg = *p - '0'; in decompress_event()
271 pe->unit = (*p == '\0' ? NULL : p); in decompress_event()
273 pe->long_desc = (*p == '\0' ? NULL : p); in decompress_event()
280 pm->metric_name = (*p == '\0' ? NULL : p); in decompress_metric()
282 pm->metric_group = (*p == '\0' ? NULL : p); in decompress_metric()
284 pm->metric_expr = (*p == '\0' ? NULL : p); in decompress_metric()
286 pm->metric_threshold = (*p == '\0' ? NULL : p); in decompress_metric()
288 pm->desc = (*p == '\0' ? NULL : p); in decompress_metric()
290 pm->long_desc = (*p == '\0' ? NULL : p); in decompress_metric()
292 pm->unit = (*p == '\0' ? NULL : p); in decompress_metric()
294 pm->compat = (*p == '\0' ? NULL : p); in decompress_metric()
296 pm->metricgroup_no_group = (*p == '\0' ? NULL : p); in decompress_metric()
298 pm->default_metricgroup_name = (*p == '\0' ? NULL : p); in decompress_metric()
300 pm->aggr_mode = *p - '0'; in decompress_metric()
302 pm->event_grouping = *p - '0'; in decompress_metric()
306 const struct pmu_table_entry *pmu, in pmu_events_table__for_each_event_pmu() argument
312 .pmu = &big_c_string[pmu->pmu_name.offset], in pmu_events_table__for_each_event_pmu()
315 for (uint32_t i = 0; i < pmu->num_entries; i++) { in pmu_events_table__for_each_event_pmu()
316 decompress_event(pmu->entries[i].offset, &pe); in pmu_events_table__for_each_event_pmu()
327 const struct pmu_table_entry *pmu, in pmu_events_table__find_event_pmu() argument
333 .pmu = &big_c_string[pmu->pmu_name.offset], in pmu_events_table__find_event_pmu()
335 int low = 0, high = pmu->num_entries - 1; in pmu_events_table__find_event_pmu()
340 decompress_event(pmu->entries[mid].offset, &pe); in pmu_events_table__find_event_pmu()
350 high = mid - 1; in pmu_events_table__find_event_pmu()
360 high = mid - 1; in pmu_events_table__find_event_pmu()
370 struct perf_pmu *pmu, in pmu_events_table__for_each_event() argument
374 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_events_table__for_each_event()
375 const struct pmu_table_entry *table_pmu = &table->pmus[i]; in pmu_events_table__for_each_event()
376 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in pmu_events_table__for_each_event()
379 if (pmu && !pmu__name_match(pmu, pmu_name)) in pmu_events_table__for_each_event()
383 if (pmu || ret) in pmu_events_table__for_each_event()
390 struct perf_pmu *pmu, in pmu_events_table__find_event() argument
395 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_events_table__find_event()
396 const struct pmu_table_entry *table_pmu = &table->pmus[i]; in pmu_events_table__find_event()
397 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in pmu_events_table__find_event()
400 if (!pmu__name_match(pmu, pmu_name)) in pmu_events_table__find_event()
411 struct perf_pmu *pmu) in pmu_events_table__num_events() argument
415 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_events_table__num_events()
416 const struct pmu_table_entry *table_pmu = &table->pmus[i]; in pmu_events_table__num_events()
417 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in pmu_events_table__num_events()
419 if (pmu__name_match(pmu, pmu_name)) in pmu_events_table__num_events()
420 count += table_pmu->num_entries; in pmu_events_table__num_events()
426 const struct pmu_table_entry *pmu, in pmu_metrics_table__for_each_metric_pmu() argument
432 .pmu = &big_c_string[pmu->pmu_name.offset], in pmu_metrics_table__for_each_metric_pmu()
435 for (uint32_t i = 0; i < pmu->num_entries; i++) { in pmu_metrics_table__for_each_metric_pmu()
436 decompress_metric(pmu->entries[i].offset, &pm); in pmu_metrics_table__for_each_metric_pmu()
450 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_metrics_table__for_each_metric()
451 int ret = pmu_metrics_table__for_each_metric_pmu(table, &table->pmus[i], in pmu_metrics_table__for_each_metric()
460 static const struct pmu_events_map *map_for_pmu(struct perf_pmu *pmu) in map_for_pmu() argument
464 struct perf_pmu *pmu; in map_for_pmu() member
475 if (has_last_result && last_result.pmu == pmu) in map_for_pmu()
478 cpuid = perf_pmu__getcpuid(pmu); in map_for_pmu()
495 if (!map->arch) { in map_for_pmu()
500 if (!strcmp_cpuid_str(map->cpuid, cpuid)) in map_for_pmu()
509 last_result.pmu = pmu; in map_for_pmu()
515 const struct pmu_events_table *perf_pmu__find_events_table(struct perf_pmu *pmu) in perf_pmu__find_events_table() argument
517 const struct pmu_events_map *map = map_for_pmu(pmu); in perf_pmu__find_events_table()
522 if (!pmu) in perf_pmu__find_events_table()
523 return &map->event_table; in perf_pmu__find_events_table()
525 for (size_t i = 0; i < map->event_table.num_pmus; i++) { in perf_pmu__find_events_table()
526 const struct pmu_table_entry *table_pmu = &map->event_table.pmus[i]; in perf_pmu__find_events_table()
527 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in perf_pmu__find_events_table()
529 if (pmu__name_match(pmu, pmu_name)) in perf_pmu__find_events_table()
530 return &map->event_table; in perf_pmu__find_events_table()
535 const struct pmu_metrics_table *perf_pmu__find_metrics_table(struct perf_pmu *pmu) in perf_pmu__find_metrics_table() argument
537 const struct pmu_events_map *map = map_for_pmu(pmu); in perf_pmu__find_metrics_table()
542 if (!pmu) in perf_pmu__find_metrics_table()
543 return &map->metric_table; in perf_pmu__find_metrics_table()
545 for (size_t i = 0; i < map->metric_table.num_pmus; i++) { in perf_pmu__find_metrics_table()
546 const struct pmu_table_entry *table_pmu = &map->metric_table.pmus[i]; in perf_pmu__find_metrics_table()
547 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in perf_pmu__find_metrics_table()
549 if (pmu__name_match(pmu, pmu_name)) in perf_pmu__find_metrics_table()
550 return &map->metric_table; in perf_pmu__find_metrics_table()
558 tables->arch; in find_core_events_table()
560 if (!strcmp(tables->arch, arch) && !strcmp_cpuid_str(tables->cpuid, cpuid)) in find_core_events_table()
561 return &tables->event_table; in find_core_events_table()
569 tables->arch; in find_core_metrics_table()
571 if (!strcmp(tables->arch, arch) && !strcmp_cpuid_str(tables->cpuid, cpuid)) in find_core_metrics_table()
572 return &tables->metric_table; in find_core_metrics_table()
580 tables->arch; in pmu_for_each_core_event()
582 int ret = pmu_events_table__for_each_event(&tables->event_table, in pmu_for_each_core_event()
583 /*pmu=*/ NULL, fn, data); in pmu_for_each_core_event()
594 tables->arch; in pmu_for_each_core_metric()
596 int ret = pmu_metrics_table__for_each_metric(&tables->metric_table, fn, data); in pmu_for_each_core_metric()
607 tables->name; in find_sys_events_table()
609 if (!strcmp(tables->name, name)) in find_sys_events_table()
610 return &tables->event_table; in find_sys_events_table()
618 tables->name; in pmu_for_each_sys_event()
620 int ret = pmu_events_table__for_each_event(&tables->event_table, in pmu_for_each_sys_event()
621 /*pmu=*/ NULL, fn, data); in pmu_for_each_sys_event()
632 tables->name; in pmu_for_each_sys_metric()
634 int ret = pmu_metrics_table__for_each_metric(&tables->metric_table, fn, data); in pmu_for_each_sys_metric()
648 int low = 0, high = (int)ARRAY_SIZE(metricgroups) - 1; in describe_metricgroup()
660 high = mid - 1; in describe_metricgroup()