Lines Matching +full:cpu +full:- +full:offset

2 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <pmu-events/pmu-events.h>
12 int offset; member
22 /* offset=0 */ "tool\000"
23 /* offset=5 */ "duration_time\000tool\000Wall clock interval time in nanoseconds\000config=1\000\00…
24 /* offset=78 */ "user_time\000tool\000User (non-kernel) time in nanoseconds\000config=2\000\00000\0…
25 /* offset=145 */ "system_time\000tool\000System/kernel time in nanoseconds\000config=3\000\00000\00…
26 /* offset=210 */ "has_pmem\000tool\0001 if persistent memory installed otherwise 0\000config=4\000\…
27 …* offset=283 */ "num_cores\000tool\000Number of cores. A core consists of 1 or more thread, with e…
28 /* offset=425 */ "num_cpus\000tool\000Number of logical Linux CPUs. There may be multiple such CPUs…
29 /* offset=525 */ "num_cpus_online\000tool\000Number of online logical Linux CPUs. There may be mult…
30 /* offset=639 */ "num_dies\000tool\000Number of dies. Each die has 1 or more cores\000config=8\000\…
31 /* offset=712 */ "num_packages\000tool\000Number of packages. Each package has 1 or more die\000con…
32 /* offset=795 */ "slots\000tool\000Number of functional units that in parallel can execute parts of…
33 /* offset=902 */ "smt_on\000tool\0001 if simultaneous multithreading (aka hyperthreading) is enable…
34 /* offset=1006 */ "system_tsc_freq\000tool\000The amount a Time Stamp Counter (TSC) increases per s…
35 /* offset=1102 */ "default_core\000"
36 /* offset=1115 */ "bp_l1_btb_correct\000branch\000L1 BTB Correction\000event=0x8a\000\00000\000\000"
37 /* offset=1174 */ "bp_l2_btb_correct\000branch\000L2 BTB Correction\000event=0x8b\000\00000\000\000"
38 /* offset=1233 */ "l3_cache_rd\000cache\000L3 cache access, read\000event=0x40\000\00000\000Attribu…
39 /* offset=1328 */ "segment_reg_loads.any\000other\000Number of segment register loads\000event=6,pe…
40 /* offset=1427 */ "dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispat…
41 /* offset=1557 */ "eist_trans\000other\000Number of Enhanced Intel SpeedStep(R) Technology (EIST) t…
42 /* offset=1672 */ "hisi_sccl,ddrc\000"
43 /* offset=1687 */ "uncore_hisi_ddrc.flux_wcmd\000uncore\000DDRC write commands\000event=2\000\00000…
44 /* offset=1773 */ "uncore_cbox\000"
45offset=1785 */ "unc_cbo_xsnp_response.miss_eviction\000uncore\000A cross-core snoop resulted from …
46 /* offset=2016 */ "event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000UNC_CBO_HYPH…
47 /* offset=2081 */ "event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000UNC_CBO_…
48 /* offset=2152 */ "hisi_sccl,l3c\000"
49 /* offset=2166 */ "uncore_hisi_l3c.rd_hit_cpipe\000uncore\000Total read hits\000event=7\000\00000\0…
50 /* offset=2246 */ "uncore_imc_free_running\000"
51 /* offset=2270 */ "uncore_imc_free_running.cache_miss\000uncore\000Total cache misses\000event=0x12…
52 /* offset=2365 */ "uncore_imc\000"
53 /* offset=2376 */ "uncore_imc.cache_hits\000uncore\000Total cache hits\000event=0x34\000\00000\000T…
54 /* offset=2454 */ "uncore_sys_ddr_pmu\000"
55 /* offset=2473 */ "sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8…
56 /* offset=2546 */ "uncore_sys_ccn_pmu\000"
57 /* offset=2565 */ "sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x0…
58 /* offset=2639 */ "uncore_sys_cmn_pmu\000"
59 /* offset=2658 */ "sys_cmn_pmu.hnf_cache_miss\000uncore\000Counts total cache misses in first looku…
60 /* offset=2798 */ "CPI\000\0001 / IPC\000\000\000\000\000\000\000\00000"
61 /* offset=2820 */ "IPC\000group1\000inst_retired.any / cpu_clk_unhalted.thread\000\000\000\000\000\…
62 /* offset=2883 */ "Frontend_Bound_SMT\000\000idq_uops_not_delivered.core / (4 * (cpu_clk_unhalted.t…
63 /* offset=3049 */ "dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\0…
64 /* offset=3113 */ "icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\00…
65 /* offset=3180 */ "cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\…
66 /* offset=3251 */ "DCache_L2_All_Hits\000\000l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqs…
67 /* offset=3345 */ "DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data…
68 /* offset=3479 */ "DCache_L2_All\000\000DCache_L2_All_Hits + DCache_L2_All_Miss\000\000\000\000\000…
69 /* offset=3543 */ "DCache_L2_Hits\000\000d_ratio(DCache_L2_All_Hits, DCache_L2_All)\000\000\000\000…
70 /* offset=3611 */ "DCache_L2_Misses\000\000d_ratio(DCache_L2_All_Miss, DCache_L2_All)\000\000\000\0…
71 /* offset=3681 */ "M1\000\000ipc + M2\000\000\000\000\000\000\000\00000"
72 /* offset=3703 */ "M2\000\000ipc + M1\000\000\000\000\000\000\000\00000"
73 /* offset=3725 */ "M3\000\0001 / M3\000\000\000\000\000\000\000\00000"
74 /* offset=3745 */ "L1D_Cache_Fill_BW\000\00064 * l1d.replacement / 1e9 / duration_time\000\000\000\…
80 …f 1 or more thread, with each thread being associated with a logical Linux CPU\000config=5\000\000…
89 { 78 }, /* user_time\000tool\000User (non-kernel) time in nanoseconds\000config=2\000\00000\000\000…
104 { 1427 }, /* dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatch for…
116 { 2016 }, /* event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000UNC_CBO_HYPHEN\000…
117 { 2081 }, /* event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000UNC_CBO_TWO_HY…
118 …ncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event…
165 { 3345 }, /* DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hi…
175 { 3049 }, /* dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000…
176 { 3113 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\…
189 { 2565 }, /* sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x01\0000…
195 { 2473 }, /* sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8\00000…
231 * Map a CPU to its table of PMU events. The CPU is identified by the
232 * cpuid field, which is an arch-specific identifier for the CPU.
233 * The identifier specified in tools/perf/pmu-events/arch/xxx/mapfile
246 * Global table mapping each known CPU for the architecture to its
299 static void decompress_event(int offset, struct pmu_event *pe) in decompress_event() argument
301 const char *p = &big_c_string[offset]; in decompress_event()
303 pe->name = (*p == '\0' ? NULL : p); in decompress_event()
305 pe->topic = (*p == '\0' ? NULL : p); in decompress_event()
307 pe->desc = (*p == '\0' ? NULL : p); in decompress_event()
309 pe->event = (*p == '\0' ? NULL : p); in decompress_event()
311 pe->compat = (*p == '\0' ? NULL : p); in decompress_event()
313 pe->deprecated = *p - '0'; in decompress_event()
315 pe->perpkg = *p - '0'; in decompress_event()
317 pe->unit = (*p == '\0' ? NULL : p); in decompress_event()
319 pe->long_desc = (*p == '\0' ? NULL : p); in decompress_event()
322 static void decompress_metric(int offset, struct pmu_metric *pm) in decompress_metric() argument
324 const char *p = &big_c_string[offset]; in decompress_metric()
326 pm->metric_name = (*p == '\0' ? NULL : p); in decompress_metric()
328 pm->metric_group = (*p == '\0' ? NULL : p); in decompress_metric()
330 pm->metric_expr = (*p == '\0' ? NULL : p); in decompress_metric()
332 pm->metric_threshold = (*p == '\0' ? NULL : p); in decompress_metric()
334 pm->desc = (*p == '\0' ? NULL : p); in decompress_metric()
336 pm->long_desc = (*p == '\0' ? NULL : p); in decompress_metric()
338 pm->unit = (*p == '\0' ? NULL : p); in decompress_metric()
340 pm->compat = (*p == '\0' ? NULL : p); in decompress_metric()
342 pm->metricgroup_no_group = (*p == '\0' ? NULL : p); in decompress_metric()
344 pm->default_metricgroup_name = (*p == '\0' ? NULL : p); in decompress_metric()
346 pm->aggr_mode = *p - '0'; in decompress_metric()
348 pm->event_grouping = *p - '0'; in decompress_metric()
358 .pmu = &big_c_string[pmu->pmu_name.offset], in pmu_events_table__for_each_event_pmu()
361 for (uint32_t i = 0; i < pmu->num_entries; i++) { in pmu_events_table__for_each_event_pmu()
362 decompress_event(pmu->entries[i].offset, &pe); in pmu_events_table__for_each_event_pmu()
379 .pmu = &big_c_string[pmu->pmu_name.offset], in pmu_events_table__find_event_pmu()
381 int low = 0, high = pmu->num_entries - 1; in pmu_events_table__find_event_pmu()
386 decompress_event(pmu->entries[mid].offset, &pe); in pmu_events_table__find_event_pmu()
396 high = mid - 1; in pmu_events_table__find_event_pmu()
406 high = mid - 1; in pmu_events_table__find_event_pmu()
420 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_events_table__for_each_event()
421 const struct pmu_table_entry *table_pmu = &table->pmus[i]; in pmu_events_table__for_each_event()
422 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in pmu_events_table__for_each_event()
441 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_events_table__find_event()
442 const struct pmu_table_entry *table_pmu = &table->pmus[i]; in pmu_events_table__find_event()
443 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in pmu_events_table__find_event()
461 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_events_table__num_events()
462 const struct pmu_table_entry *table_pmu = &table->pmus[i]; in pmu_events_table__num_events()
463 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in pmu_events_table__num_events()
466 count += table_pmu->num_entries; in pmu_events_table__num_events()
478 .pmu = &big_c_string[pmu->pmu_name.offset], in pmu_metrics_table__for_each_metric_pmu()
481 for (uint32_t i = 0; i < pmu->num_entries; i++) { in pmu_metrics_table__for_each_metric_pmu()
482 decompress_metric(pmu->entries[i].offset, &pm); in pmu_metrics_table__for_each_metric_pmu()
496 for (size_t i = 0; i < table->num_pmus; i++) { in pmu_metrics_table__for_each_metric()
497 int ret = pmu_metrics_table__for_each_metric_pmu(table, &table->pmus[i], in pmu_metrics_table__for_each_metric()
506 static const struct pmu_events_map *map_for_cpu(struct perf_cpu cpu) in map_for_cpu() argument
510 struct perf_cpu cpu; in map_for_cpu() member
521 if (has_last_result && last_result.cpu.cpu == cpu.cpu) in map_for_cpu()
524 cpuid = get_cpuid_allow_env_override(cpu); in map_for_cpu()
541 if (!map->arch) { in map_for_cpu()
546 if (!strcmp_cpuid_str(map->cpuid, cpuid)) in map_for_cpu()
555 last_result.cpu = cpu; in map_for_cpu()
563 struct perf_cpu cpu = {-1}; in map_for_pmu() local
566 cpu = perf_cpu_map__min(pmu->cpus); in map_for_pmu()
567 return map_for_cpu(cpu); in map_for_pmu()
578 return &map->event_table; in perf_pmu__find_events_table()
580 for (size_t i = 0; i < map->event_table.num_pmus; i++) { in perf_pmu__find_events_table()
581 const struct pmu_table_entry *table_pmu = &map->event_table.pmus[i]; in perf_pmu__find_events_table()
582 const char *pmu_name = &big_c_string[table_pmu->pmu_name.offset]; in perf_pmu__find_events_table()
585 return &map->event_table; in perf_pmu__find_events_table()
592 struct perf_cpu cpu = {-1}; in pmu_metrics_table__find() local
593 const struct pmu_events_map *map = map_for_cpu(cpu); in pmu_metrics_table__find()
595 return map ? &map->metric_table : NULL; in pmu_metrics_table__find()
601 tables->arch; in find_core_events_table()
603 if (!strcmp(tables->arch, arch) && !strcmp_cpuid_str(tables->cpuid, cpuid)) in find_core_events_table()
604 return &tables->event_table; in find_core_events_table()
612 tables->arch; in find_core_metrics_table()
614 if (!strcmp(tables->arch, arch) && !strcmp_cpuid_str(tables->cpuid, cpuid)) in find_core_metrics_table()
615 return &tables->metric_table; in find_core_metrics_table()
623 tables->arch; in pmu_for_each_core_event()
625 int ret = pmu_events_table__for_each_event(&tables->event_table, in pmu_for_each_core_event()
637 tables->arch; in pmu_for_each_core_metric()
639 int ret = pmu_metrics_table__for_each_metric(&tables->metric_table, fn, data); in pmu_for_each_core_metric()
650 tables->name; in find_sys_events_table()
652 if (!strcmp(tables->name, name)) in find_sys_events_table()
653 return &tables->event_table; in find_sys_events_table()
661 tables->name; in pmu_for_each_sys_event()
663 int ret = pmu_events_table__for_each_event(&tables->event_table, in pmu_for_each_sys_event()
675 tables->name; in pmu_for_each_sys_metric()
677 int ret = pmu_metrics_table__for_each_metric(&tables->metric_table, fn, data); in pmu_for_each_sys_metric()
691 int low = 0, high = (int)ARRAY_SIZE(metricgroups) - 1; in describe_metricgroup()
703 high = mid - 1; in describe_metricgroup()