| /Linux-v5.10/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 | stat.c | 153 struct perf_counts *counts; in evsel__alloc_prev_raw_counts() local 155 counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_prev_raw_counts() 156 if (counts) in evsel__alloc_prev_raw_counts() 157 evsel->prev_raw_counts = counts; in evsel__alloc_prev_raw_counts() 159 return counts ? 0 : -ENOMEM; in evsel__alloc_prev_raw_counts() 239 *perf_counts(evsel->counts, cpu, thread) = in perf_evsel__copy_prev_raw_counts() 245 evsel->counts->aggr = evsel->prev_raw_counts->aggr; in perf_evsel__copy_prev_raw_counts() 329 struct perf_counts_values *aggr = &evsel->counts->aggr; in process_counter_values() 390 perf_counts(counter->counts, cpu, thread))) in process_counter_maps() 401 struct perf_counts_values *aggr = &counter->counts->aggr; in perf_stat_process_counter() [all …]
|
| D | stat-display.c | 438 if (run == 0 || ena == 0 || counter->counts->scaled == -1) { in printout() 511 val += perf_counts(counter->counts, cpu, 0)->val; in aggr_update_shadow() 599 struct perf_counts_values *counts; in aggr_cb() local 606 counts = perf_counts(counter->counts, cpu, 0); in aggr_cb() 611 if (counts->ena == 0 || counts->run == 0 || in aggr_cb() 612 counter->counts->scaled == -1) { in aggr_cb() 617 ad->val += counts->val; in aggr_cb() 618 ad->ena += counts->ena; in aggr_cb() 619 ad->run += counts->run; in aggr_cb() 716 val += perf_counts(counter->counts, cpu, thread)->val; in sort_aggr_thread() [all …]
|
| /Linux-v5.10/arch/powerpc/platforms/pseries/ |
| D | msi.c | 230 struct msi_counts *counts = data; in count_non_bridge_devices() local 240 counts->num_devices++; in count_non_bridge_devices() 247 struct msi_counts *counts = data; in count_spare_msis() local 251 if (dn == counts->requestor) in count_spare_msis() 252 req = counts->request; in count_spare_msis() 266 if (req < counts->quota) in count_spare_msis() 267 counts->spare += counts->quota - req; in count_spare_msis() 268 else if (req > counts->quota) in count_spare_msis() 269 counts->over_quota++; in count_spare_msis() 277 struct msi_counts counts; in msi_quota_for_device() local [all …]
|
| /Linux-v5.10/tools/lib/perf/tests/ |
| D | test-evsel.c | 36 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local 38 perf_evsel__read(evsel, cpu, 0, &counts); in test_stat_cpu() 39 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu() 51 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local 71 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 72 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread() 83 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local 104 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 105 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable() 110 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() [all …]
|
| D | test-evlist.c | 68 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local 70 perf_evsel__read(evsel, cpu, 0, &counts); in test_stat_cpu() 71 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu() 84 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local 122 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 123 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread() 135 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local 175 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 176 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable() 182 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() [all …]
|
| /Linux-v5.10/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.10/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 | 26 } counts SEC(".maps"); 72 val = bpf_map_lookup_elem(&counts, &key); in bpf_prog1() 76 bpf_map_update_elem(&counts, &key, &one, BPF_NOEXIST); in bpf_prog1()
|
| D | offwaketime_kern.c | 36 } counts SEC(".maps"); 100 val = bpf_map_lookup_elem(&counts, &key); in update_counts() 102 bpf_map_update_elem(&counts, &key, &zero, BPF_NOEXIST); in update_counts() 103 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.10/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.10/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.10/arch/x86/kernel/cpu/resctrl/ |
| D | pseudo_lock.c | 934 struct residency_counts *counts) in measure_residency_fn() argument 1040 counts->miss_before = miss_before; in measure_residency_fn() 1041 counts->hits_before = hits_before; in measure_residency_fn() 1042 counts->miss_after = miss_after; in measure_residency_fn() 1043 counts->hits_after = hits_after; in measure_residency_fn() 1050 struct residency_counts counts = {0}; in measure_l2_residency() local 1072 measure_residency_fn(&perf_miss_attr, &perf_hit_attr, plr, &counts); in measure_l2_residency() 1077 trace_pseudo_lock_l2(counts.hits_after - counts.hits_before, in measure_l2_residency() 1078 counts.miss_after - counts.miss_before); in measure_l2_residency() 1088 struct residency_counts counts = {0}; in measure_l3_residency() local [all …]
|
| /Linux-v5.10/drivers/scsi/ |
| D | ch.c | 115 u_int counts[CH_TYPES]; member 228 ch->counts[i]) in ch_elem_to_typecode() 316 ch->counts[CHET_MT] = in ch_readconfig() 320 ch->counts[CHET_ST] = in ch_readconfig() 324 ch->counts[CHET_IE] = in ch_readconfig() 328 ch->counts[CHET_DT] = in ch_readconfig() 332 ch->counts[CHET_MT]); in ch_readconfig() 335 ch->counts[CHET_ST]); in ch_readconfig() 338 ch->counts[CHET_IE]); in ch_readconfig() 341 ch->counts[CHET_DT]); in ch_readconfig() [all …]
|
| /Linux-v5.10/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.10/drivers/gpu/drm/msm/disp/dpu1/ |
| D | dpu_core_irq.c | 114 int i, ret = 0, counts; in dpu_core_irq_enable() local 121 counts = atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idxs[0]]); in dpu_core_irq_enable() 122 if (counts) in dpu_core_irq_enable() 123 DRM_ERROR("irq_idx=%d enable_count=%d\n", irq_idxs[0], counts); in dpu_core_irq_enable() 169 int i, ret = 0, counts; in dpu_core_irq_disable() local 176 counts = atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idxs[0]]); in dpu_core_irq_disable() 177 if (counts == 2) in dpu_core_irq_disable() 178 DRM_ERROR("irq_idx=%d enable_count=%d\n", irq_idxs[0], counts); in dpu_core_irq_disable()
|
| /Linux-v5.10/drivers/watchdog/ |
| D | loongson1_wdt.c | 41 unsigned int counts; in ls1x_wdt_set_timeout() local 45 counts = drvdata->clk_rate * min(timeout, max_hw_heartbeat); in ls1x_wdt_set_timeout() 46 writel(counts, drvdata->base + WDT_TIMER); in ls1x_wdt_set_timeout()
|
| /Linux-v5.10/tools/perf/Documentation/ |
| D | perf-stat.txt | 50 'percore' is a event qualifier that sums up the event counts for both 123 Do not aggregate counts across all monitored CPUs. 135 print counts using a CSV-style output to make it easy to import directly into 241 If the metric exists, it is calculated by the counts generated in this interval and the metric is p… 261 Aggregate counts per processor socket for system-wide mode measurements. This 268 Aggregate counts per processor die for system-wide mode measurements. This 275 Aggregate counts per physical processor for system-wide mode measurements. This 281 Aggregate counts per monitored threads, when monitoring threads (-t option) 285 Aggregate counts per NUMA nodes for system-wide mode measurements. This 336 Aggregate counts per processor socket for system-wide mode measurements. [all …]
|
| /Linux-v5.10/tools/perf/tests/ |
| D | openat-syscall.c | 54 if (perf_counts(evsel->counts, 0, 0)->val != nr_openat_calls) { in test__openat_syscall_event() 56 nr_openat_calls, perf_counts(evsel->counts, 0, 0)->val); in test__openat_syscall_event()
|
| /Linux-v5.10/arch/ia64/kernel/ |
| D | smp.c | 257 unsigned short *counts = __ia64_per_cpu_var(shadow_flush_counts); in smp_flush_tlb_cpumask() local 265 counts[cpu] = local_tlb_flush_counts[cpu].count & 0xffff; in smp_flush_tlb_cpumask() 279 while(counts[cpu] == (local_tlb_flush_counts[cpu].count & 0xffff)) in smp_flush_tlb_cpumask()
|