Lines Matching +full:event +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0
8 #include "pmu-events/pmu-events.h"
17 const char *event; member
21 static u64 find_value(const char *name, struct value *values) in find_value() argument
25 while (v->event) { in find_value()
26 if (!strcmp(name, v->event)) in find_value()
27 return v->val; in find_value()
40 count = find_value(evsel->name, vals); in load_runtime_stat()
41 evsel->supported = true; in load_runtime_stat()
42 evsel->stats->aggr->counts.val = count; in load_runtime_stat()
49 const char *name) in compute_single() argument
58 list_for_each_entry (mexp, &me->head, nd) { in compute_single()
59 if (strcmp(mexp->metric_name, name)) in compute_single()
68 static int __compute_metric(const char *name, struct value *vals, in __compute_metric() argument
86 return -ENOMEM; in __compute_metric()
91 return -ENOMEM; in __compute_metric()
94 perf_evlist__set_maps(&evlist->core, cpus, NULL); in __compute_metric()
98 err = metricgroup__parse_groups_test(evlist, pme_test, name, in __compute_metric()
125 static int compute_metric(const char *name, struct value *vals, double *ratio) in compute_metric() argument
127 return __compute_metric(name, vals, name, ratio, NULL, NULL); in compute_metric()
130 static int compute_metric_group(const char *name, struct value *vals, in compute_metric_group() argument
134 return __compute_metric(name, vals, name1, ratio1, name2, ratio2); in compute_metric_group()
141 { .event = "inst_retired.any", .val = 300 }, in test_ipc()
142 { .event = "cpu_clk_unhalted.thread", .val = 200 }, in test_ipc()
143 { .event = NULL, }, in test_ipc()
158 { .event = "idq_uops_not_delivered.core", .val = 300 }, in test_frontend()
159 { .event = "cpu_clk_unhalted.thread", .val = 200 }, in test_frontend()
160 { .event = "cpu_clk_unhalted.one_thread_active", .val = 400 }, in test_frontend()
161 { .event = "cpu_clk_unhalted.ref_xclk", .val = 600 }, in test_frontend()
162 { .event = NULL, }, in test_frontend()
177 { .event = "l1d-loads-misses", .val = 300 }, in test_cache_miss_cycles()
178 { .event = "l1i-loads-misses", .val = 200 }, in test_cache_miss_cycles()
179 { .event = "inst_retired.any", .val = 400 }, in test_cache_miss_cycles()
180 { .event = NULL, }, in test_cache_miss_cycles()
194 * DCache_L2_All_Miss = max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) +
208 * DCache_L2_All_Miss = MAX(400 - 100, 0) + 500 + 600 = 1400
217 { .event = "l2_rqsts.demand_data_rd_hit", .val = 100 }, in test_dcache_l2()
218 { .event = "l2_rqsts.pf_hit", .val = 200 }, in test_dcache_l2()
219 { .event = "l2_rqsts.rfo_hit", .val = 300 }, in test_dcache_l2()
220 { .event = "l2_rqsts.all_demand_data_rd", .val = 400 }, in test_dcache_l2()
221 { .event = "l2_rqsts.pf_miss", .val = 500 }, in test_dcache_l2()
222 { .event = "l2_rqsts.rfo_miss", .val = 600 }, in test_dcache_l2()
223 { .event = NULL, }, in test_dcache_l2()
244 { .event = "inst_retired.any", .val = 300 }, in test_recursion_fail()
245 { .event = "cpu_clk_unhalted.thread", .val = 200 }, in test_recursion_fail()
246 { .event = NULL, }, in test_recursion_fail()
250 compute_metric("M1", vals, &ratio) == -1); in test_recursion_fail()
253 compute_metric("M3", vals, &ratio) == -1); in test_recursion_fail()
261 { .event = "l1d.replacement", .val = 4000000 }, in test_memory_bandwidth()
262 { .event = "duration_time", .val = 200000000 }, in test_memory_bandwidth()
263 { .event = NULL, }, in test_memory_bandwidth()
278 { .event = "cpu_clk_unhalted.thread", .val = 200 }, in test_metric_group()
279 { .event = "l1d-loads-misses", .val = 300 }, in test_metric_group()
280 { .event = "l1i-loads-misses", .val = 200 }, in test_metric_group()
281 { .event = "inst_retired.any", .val = 400 }, in test_metric_group()
282 { .event = NULL, }, in test_metric_group()