/linux-6.3-rc2/tools/perf/util/ |
A D | counts.c | 12 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local 14 if (counts) { in perf_counts__new() 19 free(counts); in perf_counts__new() 23 counts->values = values; in perf_counts__new() 28 free(counts); in perf_counts__new() 32 counts->loaded = values; in perf_counts__new() 35 return counts; in perf_counts__new() 40 if (counts) { in perf_counts__delete() 43 free(counts); in perf_counts__delete() 49 xyarray__reset(counts->loaded); in perf_counts__reset() [all …]
|
A D | counts.h | 20 perf_counts(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts() argument 22 return xyarray__entry(counts->values, cpu_map_idx, thread); in perf_counts() 26 perf_counts__is_loaded(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts__is_loaded() argument 28 return *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)); in perf_counts__is_loaded() 32 perf_counts__set_loaded(struct perf_counts *counts, int cpu_map_idx, int thread, bool loaded) in perf_counts__set_loaded() argument 34 *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)) = loaded; in perf_counts__set_loaded() 38 void perf_counts__delete(struct perf_counts *counts); 39 void perf_counts__reset(struct perf_counts *counts);
|
A D | stat.c | 208 struct perf_counts *counts; in evsel__alloc_prev_raw_counts() local 211 if (counts) in evsel__alloc_prev_raw_counts() 214 return counts ? 0 : -ENOMEM; in evsel__alloc_prev_raw_counts() 471 ps_aggr->counts.val = 0; in process_counter_values() 472 ps_aggr->counts.ena = 0; in process_counter_values() 646 counts.val += aggr->counts.val; in evsel__update_percore_stats() 647 counts.ena += aggr->counts.ena; in evsel__update_percore_stats() 648 counts.run += aggr->counts.run; in evsel__update_percore_stats() 659 aggr->counts.val = counts.val; in evsel__update_percore_stats() 660 aggr->counts.ena = counts.ena; in evsel__update_percore_stats() [all …]
|
A D | bpf_counter.c | 242 counts = perf_counts(evsel->counts, idx, 0); in bpf_program_profiler__read() 243 counts->val = 0; in bpf_program_profiler__read() 244 counts->ena = 0; in bpf_program_profiler__read() 245 counts->run = 0; in bpf_program_profiler__read() 264 counts = perf_counts(evsel->counts, idx, 0); in bpf_program_profiler__read() 653 counts = perf_counts(evsel->counts, j, 0); in bperf__read() 662 counts = perf_counts(evsel->counts, i, 0); in bperf__read() 669 counts = perf_counts(evsel->counts, 0, i); in bperf__read() 670 counts->val = 0; in bperf__read() 671 counts->ena = 0; in bperf__read() [all …]
|
A D | branch.c | 27 st->counts[flags->type]++; in branch_type_count() 118 total += st->counts[i]; in branch_type_stat_display() 152 if (st->counts[i] > 0) in branch_type_stat_display() 156 (double)st->counts[i] / (double)total); in branch_type_stat_display() 180 total += st->counts[i]; in branch_type_str() 198 if (st->counts[i] > 0) in branch_type_str()
|
A D | bpf_counter_cgroup.c | 237 struct perf_counts_values *counts; in bperf_cgrp__read() local 265 counts = perf_counts(evsel->counts, i, 0); in bperf_cgrp__read() 266 counts->val = values[cpu.cpu].counter; in bperf_cgrp__read() 267 counts->ena = values[cpu.cpu].enabled; in bperf_cgrp__read() 268 counts->run = values[cpu.cpu].running; in bperf_cgrp__read()
|
/linux-6.3-rc2/tools/lib/perf/tests/ |
A D | test-evsel.c | 75 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 108 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 114 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 175 start = counts.val; in test_stat_user_read() 180 end = counts.val; in test_stat_user_read() 198 struct perf_counts_values counts; in test_stat_read_format_single() local 212 memset(&counts, -1, sizeof(counts)); in test_stat_read_format_single() 221 __T("failed to read ID", counts.id); in test_stat_read_format_single() 233 struct perf_counts_values counts; in test_stat_read_format_group() local 258 memset(&counts, -1, sizeof(counts)); in test_stat_read_format_group() [all …]
|
A D | test-evlist.c | 528 min = counts[0].val; in test_stat_multiplexing() 531 i, counts[i].val, counts[i].run, counts[i].ena); in test_stat_multiplexing() 536 counts[i].val, in test_stat_multiplexing() 537 (double)counts[i].run / (double)counts[i].ena * 100.0, in test_stat_multiplexing() 538 counts[i].run, counts[i].ena); in test_stat_multiplexing() 545 if (counts[i].val > max) in test_stat_multiplexing() 546 max = counts[i].val; in test_stat_multiplexing() 548 if (counts[i].val < min) in test_stat_multiplexing() 549 min = counts[i].val; in test_stat_multiplexing() 551 avg += counts[i].val; in test_stat_multiplexing() [all …]
|
/linux-6.3-rc2/arch/powerpc/platforms/pseries/ |
A D | msi.c | 233 counts->num_devices++; in count_non_bridge_devices() 245 req = counts->request; in count_spare_msis() 259 if (req < counts->quota) in count_spare_msis() 260 counts->spare += counts->quota - req; in count_spare_msis() 262 counts->over_quota++; in count_spare_msis() 270 struct msi_counts counts; in msi_quota_for_device() local 298 counts.quota = total / counts.num_devices; in msi_quota_for_device() 304 counts.request = request; in msi_quota_for_device() 309 counts.spare += total % counts.num_devices; in msi_quota_for_device() 312 if (counts.over_quota) in msi_quota_for_device() [all …]
|
/linux-6.3-rc2/samples/bpf/ |
A D | sampleip_user.c | 82 struct ipcount counts[MAX_IPS]; variable 102 counts[i].ip = next_key; in print_ip_map() 103 counts[i++].count = value; in print_ip_map() 109 qsort(counts, max, sizeof(struct ipcount), count_cmp); in print_ip_map() 111 if (counts[i].ip > PAGE_OFFSET) { in print_ip_map() 112 sym = ksym_search(counts[i].ip); in print_ip_map() 118 printf("0x%-17llx %-32s %u\n", counts[i].ip, sym->name, in print_ip_map() 119 counts[i].count); in print_ip_map() 121 printf("0x%-17llx %-32s %u\n", counts[i].ip, "(user)", in print_ip_map() 122 counts[i].count); in print_ip_map()
|
A D | trace_event_kern.c | 25 } counts SEC(".maps"); 71 val = bpf_map_lookup_elem(&counts, &key); in bpf_prog1() 75 bpf_map_update_elem(&counts, &key, &one, BPF_NOEXIST); in bpf_prog1()
|
A D | offwaketime_kern.c | 37 } counts SEC(".maps"); 101 val = bpf_map_lookup_elem(&counts, &key); in update_counts() 103 bpf_map_update_elem(&counts, &key, &zero, BPF_NOEXIST); in update_counts() 104 val = bpf_map_lookup_elem(&counts, &key); in update_counts()
|
/linux-6.3-rc2/drivers/md/ |
A D | md-bitmap.c | 1232 struct bitmap_counts *counts; in md_bitmap_daemon_work() local 1286 counts = &bitmap->counts; in md_bitmap_daemon_work() 1287 spin_lock_irq(&counts->lock); in md_bitmap_daemon_work() 1756 bp = bitmap->counts.bp; in md_bitmap_free() 1995 counts = &bitmap->counts; in md_bitmap_copy_from_slot() 2035 counts = &bitmap->counts; in md_bitmap_status() 2040 counts->pages - counts->missing_pages, in md_bitmap_status() 2041 counts->pages, in md_bitmap_status() 2042 (counts->pages - counts->missing_pages) in md_bitmap_status() 2148 old_counts = bitmap->counts; in md_bitmap_resize() [all …]
|
/linux-6.3-rc2/drivers/media/v4l2-core/ |
A D | v4l2-vp9.c | 1683 *counts->eob[i][j][k][l][m][1], in _adapt_coeff() 1684 *counts->eob[i][j][k][l][m][0] - *counts->eob[i][j][k][l][m][1], in _adapt_coeff() 1702 _adapt_coeff(i, j, k, probs, counts, uf); in _adapt_coef_probs() 1711 _adapt_coef_probs(probs, counts, 112); in v4l2_vp9_adapt_coef_probs() 1714 _adapt_coef_probs(probs, counts, 128); in v4l2_vp9_adapt_coef_probs() 1716 _adapt_coef_probs(probs, counts, 112); in v4l2_vp9_adapt_coef_probs() 1755 return noncoef_merge_prob(prob, counts[0], counts[1]); in adapt_prob() 1779 (*counts->single_ref)[i][j]); in v4l2_vp9_adapt_noncoef_probs() 1818 (*counts->bits)[i][j]); in v4l2_vp9_adapt_noncoef_probs() 1822 (*counts->class0_fp)[i][j]); in v4l2_vp9_adapt_noncoef_probs() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A D | test_btf_newkv.c | 22 struct ipv_counts *counts; in test_long_fname_2() local 25 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2() 26 if (!counts) in test_long_fname_2() 29 counts->v6++; in test_long_fname_2()
|
A D | test_btf_nokv.c | 21 struct ipv_counts *counts; in test_long_fname_2() local 24 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2() 25 if (!counts) in test_long_fname_2() 28 counts->v6++; in test_long_fname_2()
|
/linux-6.3-rc2/arch/x86/hyperv/ |
A D | hv_proc.c | 27 int *counts; in hv_call_deposit_pages() local 48 counts = kcalloc(HV_DEPOSIT_MAX, sizeof(int), GFP_KERNEL); in hv_call_deposit_pages() 49 if (!counts) { in hv_call_deposit_pages() 74 counts[i] = 1 << order; in hv_call_deposit_pages() 75 num_pages -= counts[i]; in hv_call_deposit_pages() 89 for (j = 0; j < counts[i]; ++j, ++page_count) in hv_call_deposit_pages() 107 for (j = 0; j < counts[i]; ++j) in hv_call_deposit_pages() 113 kfree(counts); in hv_call_deposit_pages()
|
/linux-6.3-rc2/tools/testing/kunit/ |
A D | kunit_parser.py | 47 self.counts = TestCounts() 60 self.counts.errors += 1 113 self.passed += counts.passed 114 self.failed += counts.failed 115 self.crashed += counts.crashed 117 self.errors += counts.errors 646 counts = test.counts 649 counts.add_subtest_counts(t.counts) 650 if counts.total() == 0: 651 counts.add_status(status) [all …]
|
/linux-6.3-rc2/tools/lib/perf/Documentation/examples/ |
A D | counting.c | 24 struct perf_counts_values counts; in main() local 73 perf_evsel__read(evsel, 0, 0, &counts); in main() 75 counts.val, counts.ena, counts.run); in main()
|
/linux-6.3-rc2/drivers/scsi/ |
A D | ch.c | 230 ch->counts[i]) in ch_elem_to_typecode() 318 ch->counts[CHET_MT] = in ch_readconfig() 322 ch->counts[CHET_ST] = in ch_readconfig() 326 ch->counts[CHET_IE] = in ch_readconfig() 330 ch->counts[CHET_DT] = in ch_readconfig() 334 ch->counts[CHET_MT]); in ch_readconfig() 337 ch->counts[CHET_ST]); in ch_readconfig() 340 ch->counts[CHET_IE]); in ch_readconfig() 343 ch->counts[CHET_DT]); in ch_readconfig() 660 if (ch->counts[CHET_V1]) { in ch_ioctl() [all …]
|
/linux-6.3-rc2/arch/x86/kernel/cpu/resctrl/ |
A D | pseudo_lock.c | 1050 counts->miss_before = miss_before; in measure_residency_fn() 1051 counts->hits_before = hits_before; in measure_residency_fn() 1052 counts->miss_after = miss_after; in measure_residency_fn() 1053 counts->hits_after = hits_after; in measure_residency_fn() 1087 trace_pseudo_lock_l2(counts.hits_after - counts.hits_before, in measure_l2_residency() 1088 counts.miss_after - counts.miss_before); in measure_l2_residency() 1127 counts.miss_after -= counts.miss_before; in measure_l3_residency() 1137 counts.hits_after -= counts.hits_before; in measure_l3_residency() 1139 counts.hits_after -= min(counts.miss_after, counts.hits_after); in measure_l3_residency() 1141 counts.hits_after -= counts.hits_before; in measure_l3_residency() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/amd/display/dc/link/accessories/ |
A D | link_dp_trace.c | 65 link->dp_trace.detect_lt_trace.counts.fail = fail_count; in dp_trace_lt_fail_count_update() 67 link->dp_trace.commit_lt_trace.counts.fail = fail_count; in dp_trace_lt_fail_count_update() 74 link->dp_trace.detect_lt_trace.counts.total++; in dp_trace_lt_total_count_increment() 76 link->dp_trace.commit_lt_trace.counts.total++; in dp_trace_lt_total_count_increment() 139 return &link->dp_trace.detect_lt_trace.counts; in dc_dp_trace_get_lt_counts() 141 return &link->dp_trace.commit_lt_trace.counts; in dc_dp_trace_get_lt_counts()
|
/linux-6.3-rc2/drivers/media/platform/mediatek/vcodec/vdec/ |
A D | vdec_vp9_req_lat_if.c | 365 struct vdec_vp9_slice_mem counts; member 477 struct mtk_vcodec_mem counts; member 622 if (!instance->counts.va) { in vdec_vp9_slice_alloc_working_buffer() 653 if (instance->counts.va) in vdec_vp9_slice_free_working_buffer() 1003 vsi->counts.dma_addr = instance->counts.dma_addr; in vdec_vp9_slice_setup_lat_buffer() 1004 vsi->counts.size = instance->counts.size; in vdec_vp9_slice_setup_lat_buffer() 1213 &counts->eob_branch[i][j][k].band_0[m]; in vdec_vp9_slice_map_counts_eob_coef() 1240 counts_helper->tx8p = &counts->tx_p8x8; in vdec_vp9_slice_counts_map_helper() 1546 counts = (struct vdec_vp9_slice_frame_counts *)instance->counts.va; in vdec_vp9_slice_update_prob() 1766 vsi->counts.dma_addr = instance->counts.dma_addr; in vdec_vp9_slice_setup_single_buffer() [all …]
|
/linux-6.3-rc2/tools/perf/tests/ |
A D | mmap-basic.c | 174 struct perf_counts_values counts = { .val = 0 }; in test_stat_user_read() local 228 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_user_read() 229 if (counts.val == 0) { in test_stat_user_read() 240 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_user_read() 241 start = counts.val; in test_stat_user_read() 245 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_user_read() 246 end = counts.val; in test_stat_user_read()
|
/linux-6.3-rc2/tools/lib/perf/Documentation/ |
A D | libperf-counting.txt | 37 * reads and displays event counts 171 Now we need to get the counts from events, following code iterates through the 172 events list and read counts: 177 82 perf_evsel__read(evsel, 0, 0, &counts); 179 84 counts.val, counts.ena, counts.run);
|