/Linux-v5.15/tools/perf/util/ |
D | counts.c | 11 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local 13 if (counts) { in perf_counts__new() 18 free(counts); in perf_counts__new() 22 counts->values = values; in perf_counts__new() 26 xyarray__delete(counts->values); in perf_counts__new() 27 free(counts); in perf_counts__new() 31 counts->loaded = values; in perf_counts__new() 34 return counts; in perf_counts__new() 37 void perf_counts__delete(struct perf_counts *counts) in perf_counts__delete() argument 39 if (counts) { in perf_counts__delete() [all …]
|
D | counts.h | 21 perf_counts(struct perf_counts *counts, int cpu, int thread) in perf_counts() argument 23 return xyarray__entry(counts->values, cpu, thread); in perf_counts() 27 perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread) in perf_counts__is_loaded() argument 29 return *((bool *) xyarray__entry(counts->loaded, cpu, thread)); in perf_counts__is_loaded() 33 perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded) in perf_counts__set_loaded() argument 35 *((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded; in perf_counts__set_loaded() 39 void perf_counts__delete(struct perf_counts *counts); 40 void perf_counts__reset(struct perf_counts *counts);
|
D | branch.c | 24 st->counts[flags->type]++; in branch_type_count() 67 total += st->counts[i]; in branch_type_stat_display() 101 if (st->counts[i] > 0) in branch_type_stat_display() 105 (double)st->counts[i] / (double)total); in branch_type_stat_display() 120 total += st->counts[i]; in branch_type_str() 135 if (st->counts[i] > 0) in branch_type_str()
|
D | bpf_counter.c | 243 perf_counts(evsel->counts, cpu, 0)->val = 0; in bpf_program_profiler__read() 244 perf_counts(evsel->counts, cpu, 0)->ena = 0; in bpf_program_profiler__read() 245 perf_counts(evsel->counts, cpu, 0)->run = 0; in bpf_program_profiler__read() 260 perf_counts(evsel->counts, cpu, 0)->val += values[cpu].counter; in bpf_program_profiler__read() 261 perf_counts(evsel->counts, cpu, 0)->ena += values[cpu].enabled; in bpf_program_profiler__read() 262 perf_counts(evsel->counts, cpu, 0)->run += values[cpu].running; in bpf_program_profiler__read() 629 perf_counts(evsel->counts, cpu, 0)->val = values[cpu].counter; in bperf__read() 630 perf_counts(evsel->counts, cpu, 0)->ena = values[cpu].enabled; in bperf__read() 631 perf_counts(evsel->counts, cpu, 0)->run = values[cpu].running; in bperf__read() 636 perf_counts(evsel->counts, i, 0)->val = values[cpu].counter; in bperf__read() [all …]
|
D | stat.c | 157 struct perf_counts *counts; in evsel__alloc_prev_raw_counts() local 159 counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_prev_raw_counts() 160 if (counts) in evsel__alloc_prev_raw_counts() 161 evsel->prev_raw_counts = counts; in evsel__alloc_prev_raw_counts() 163 return counts ? 0 : -ENOMEM; in evsel__alloc_prev_raw_counts() 243 *perf_counts(evsel->counts, cpu, thread) = in evsel__copy_prev_raw_counts() 249 evsel->counts->aggr = evsel->prev_raw_counts->aggr; in evsel__copy_prev_raw_counts() 361 struct perf_counts_values *aggr = &evsel->counts->aggr; in process_counter_values() 422 perf_counts(counter->counts, cpu, thread))) in process_counter_maps() 433 struct perf_counts_values *aggr = &counter->counts->aggr; in perf_stat_process_counter() [all …]
|
D | bpf_counter_cgroup.c | 249 struct perf_counts_values *counts; in bperf_cgrp__read() local 277 counts = perf_counts(evsel->counts, i, 0); in bperf_cgrp__read() 278 counts->val = values[cpu].counter; in bperf_cgrp__read() 279 counts->ena = values[cpu].enabled; in bperf_cgrp__read() 280 counts->run = values[cpu].running; in bperf_cgrp__read()
|
D | stat-display.c | 456 if (run == 0 || ena == 0 || counter->counts->scaled == -1) { in printout() 532 val += perf_counts(counter->counts, cpu, 0)->val; in aggr_update_shadow() 641 struct perf_counts_values *counts; in aggr_cb() local 648 counts = perf_counts(counter->counts, cpu, 0); in aggr_cb() 653 if (counts->ena == 0 || counts->run == 0 || in aggr_cb() 654 counter->counts->scaled == -1) { in aggr_cb() 659 ad->val += counts->val; in aggr_cb() 660 ad->ena += counts->ena; in aggr_cb() 661 ad->run += counts->run; in aggr_cb() 766 val += perf_counts(counter->counts, cpu, thread)->val; in sort_aggr_thread() [all …]
|
/Linux-v5.15/tools/lib/perf/tests/ |
D | test-evsel.c | 37 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local 39 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu() 40 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu() 52 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local 72 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 73 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread() 84 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local 105 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 106 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable() 111 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() [all …]
|
D | test-evlist.c | 74 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local 76 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu() 77 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu() 90 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local 132 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 133 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread() 145 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local 189 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 190 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable() 196 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() [all …]
|
/Linux-v5.15/arch/powerpc/platforms/pseries/ |
D | msi.c | 222 struct msi_counts *counts = data; in count_non_bridge_devices() local 232 counts->num_devices++; in count_non_bridge_devices() 239 struct msi_counts *counts = data; in count_spare_msis() local 243 if (dn == counts->requestor) in count_spare_msis() 244 req = counts->request; in count_spare_msis() 258 if (req < counts->quota) in count_spare_msis() 259 counts->spare += counts->quota - req; in count_spare_msis() 260 else if (req > counts->quota) in count_spare_msis() 261 counts->over_quota++; in count_spare_msis() 269 struct msi_counts counts; in msi_quota_for_device() local [all …]
|
/Linux-v5.15/tools/testing/selftests/bpf/progs/ |
D | test_btf_newkv.c | 34 struct ipv_counts *counts; in test_long_fname_2() local 37 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2() 38 if (!counts) in test_long_fname_2() 41 counts->v6++; in test_long_fname_2() 44 counts = bpf_map_lookup_elem(&btf_map_legacy, &key); in test_long_fname_2() 45 if (!counts) in test_long_fname_2()
|
D | test_btf_nokv.c | 23 struct ipv_counts *counts; in test_long_fname_2() local 26 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2() 27 if (!counts) in test_long_fname_2() 30 counts->v6++; in test_long_fname_2()
|
D | test_btf_haskv.c | 26 struct ipv_counts *counts; in test_long_fname_2() local 29 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2() 30 if (!counts) in test_long_fname_2() 33 counts->v6++; in test_long_fname_2()
|
/Linux-v5.15/samples/bpf/ |
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()
|
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()
|
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()
|
D | test_lru_dist.c | 175 unsigned int counts = 0; in read_keys() local 191 counts++; in read_keys() 193 counts++; /* in case the last line has no \n */ in read_keys() 195 retkeys = malloc(counts * sizeof(unsigned long long)); in read_keys() 198 counts = 0; in read_keys() 200 retkeys[counts++] = strtoull(l, NULL, 10); in read_keys() 205 return counts; in read_keys()
|
/Linux-v5.15/drivers/md/ |
D | md-bitmap.c | 929 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_set_bit() 958 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_clear_bit() 986 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_test_bit() 1066 chunks = bitmap->counts.chunks; in md_bitmap_init_from_disk() 1075 int needed = ((sector_t)(i+1) << (bitmap->counts.chunkshift) in md_bitmap_init_from_disk() 1078 (sector_t)i << bitmap->counts.chunkshift, in md_bitmap_init_from_disk() 1156 int needed = ((sector_t)(i+1) << bitmap->counts.chunkshift in md_bitmap_init_from_disk() 1159 (sector_t)i << bitmap->counts.chunkshift, in md_bitmap_init_from_disk() 1231 struct bitmap_counts *counts; in md_bitmap_daemon_work() local 1285 counts = &bitmap->counts; in md_bitmap_daemon_work() [all …]
|
/Linux-v5.15/tools/lib/perf/Documentation/examples/ |
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-v5.15/arch/x86/hyperv/ |
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-v5.15/drivers/scsi/ |
D | ch.c | 115 u_int counts[CH_TYPES]; member 229 ch->counts[i]) in ch_elem_to_typecode() 317 ch->counts[CHET_MT] = in ch_readconfig() 321 ch->counts[CHET_ST] = in ch_readconfig() 325 ch->counts[CHET_IE] = in ch_readconfig() 329 ch->counts[CHET_DT] = in ch_readconfig() 333 ch->counts[CHET_MT]); in ch_readconfig() 336 ch->counts[CHET_ST]); in ch_readconfig() 339 ch->counts[CHET_IE]); in ch_readconfig() 342 ch->counts[CHET_DT]); in ch_readconfig() [all …]
|
/Linux-v5.15/arch/x86/kernel/cpu/resctrl/ |
D | pseudo_lock.c | 938 struct residency_counts *counts) in measure_residency_fn() argument 1044 counts->miss_before = miss_before; in measure_residency_fn() 1045 counts->hits_before = hits_before; in measure_residency_fn() 1046 counts->miss_after = miss_after; in measure_residency_fn() 1047 counts->hits_after = hits_after; in measure_residency_fn() 1054 struct residency_counts counts = {0}; in measure_l2_residency() local 1076 measure_residency_fn(&perf_miss_attr, &perf_hit_attr, plr, &counts); in measure_l2_residency() 1081 trace_pseudo_lock_l2(counts.hits_after - counts.hits_before, in measure_l2_residency() 1082 counts.miss_after - counts.miss_before); in measure_l2_residency() 1092 struct residency_counts counts = {0}; in measure_l3_residency() local [all …]
|
/Linux-v5.15/tools/testing/kunit/ |
D | kunit_parser.py | 379 counts = TestCounts() 391 counts.passed += 1 394 counts.skipped += 1 397 counts.crashed += 1 402 counts.failed += 1 406 return counts 409 counts = TestCounts() 417 counts = print_and_count_results(test_result) 427 (counts.total(), counts.failed, counts.crashed, counts.skipped)))
|
/Linux-v5.15/tools/lib/perf/Documentation/ |
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);
|
/Linux-v5.15/drivers/scsi/elx/efct/ |
D | efct_hw.c | 3028 struct efct_hw_link_stat_counts counts[EFCT_HW_LINK_STAT_MAX]; in efct_hw_cb_link_stat() local 3035 memset(counts, 0, sizeof(struct efct_hw_link_stat_counts) * in efct_hw_cb_link_stat() 3040 counts[i].overflow = (mbox_rsp_flags & (1 << (i + 2))); in efct_hw_cb_link_stat() 3042 counts[EFCT_HW_LINK_STAT_LINK_FAILURE_COUNT].counter = in efct_hw_cb_link_stat() 3044 counts[EFCT_HW_LINK_STAT_LOSS_OF_SYNC_COUNT].counter = in efct_hw_cb_link_stat() 3046 counts[EFCT_HW_LINK_STAT_LOSS_OF_SIGNAL_COUNT].counter = in efct_hw_cb_link_stat() 3048 counts[EFCT_HW_LINK_STAT_PRIMITIVE_SEQ_COUNT].counter = in efct_hw_cb_link_stat() 3050 counts[EFCT_HW_LINK_STAT_INVALID_XMIT_WORD_COUNT].counter = in efct_hw_cb_link_stat() 3052 counts[EFCT_HW_LINK_STAT_CRC_COUNT].counter = in efct_hw_cb_link_stat() 3054 counts[EFCT_HW_LINK_STAT_PRIMITIVE_SEQ_TIMEOUT_COUNT].counter = in efct_hw_cb_link_stat() [all …]
|