/Linux-v5.4/arch/mips/oprofile/ |
D | op_model_mipsxx.c | 72 static inline unsigned int counters_total_to_per_cpu(unsigned int counters) in counters_total_to_per_cpu() argument 74 return counters >> vpe_shift(); in counters_total_to_per_cpu() 77 static inline unsigned int counters_per_cpu_to_total(unsigned int counters) in counters_per_cpu_to_total() argument 79 return counters << vpe_shift(); in counters_per_cpu_to_total() 137 unsigned int counters = op_model_mipsxx_ops.num_counters; in mipsxx_reg_setup() local 141 for (i = 0; i < counters; i++) { in mipsxx_reg_setup() 166 unsigned int counters = op_model_mipsxx_ops.num_counters; in mipsxx_cpu_setup() local 171 switch (counters) { in mipsxx_cpu_setup() 193 unsigned int counters = op_model_mipsxx_ops.num_counters; in mipsxx_cpu_start() local 198 switch (counters) { in mipsxx_cpu_start() [all …]
|
/Linux-v5.4/drivers/infiniband/core/ |
D | uverbs_std_types_counters.c | 42 struct ib_counters *counters = uobject->object; in uverbs_free_counters() local 45 ret = ib_destroy_usecnt(&counters->usecnt, why, uobject); in uverbs_free_counters() 49 return counters->device->ops.destroy_counters(counters); in uverbs_free_counters() 58 struct ib_counters *counters; in UVERBS_HANDLER() local 69 counters = ib_dev->ops.create_counters(ib_dev, attrs); in UVERBS_HANDLER() 70 if (IS_ERR(counters)) { in UVERBS_HANDLER() 71 ret = PTR_ERR(counters); in UVERBS_HANDLER() 75 counters->device = ib_dev; in UVERBS_HANDLER() 76 counters->uobject = uobj; in UVERBS_HANDLER() 77 uobj->object = counters; in UVERBS_HANDLER() [all …]
|
/Linux-v5.4/net/netfilter/ |
D | xt_connbytes.c | 30 const struct nf_conn_counter *counters; in connbytes_mt() local 40 counters = acct->counter; in connbytes_mt() 45 what = atomic64_read(&counters[IP_CT_DIR_ORIGINAL].packets); in connbytes_mt() 48 what = atomic64_read(&counters[IP_CT_DIR_REPLY].packets); in connbytes_mt() 51 what = atomic64_read(&counters[IP_CT_DIR_ORIGINAL].packets); in connbytes_mt() 52 what += atomic64_read(&counters[IP_CT_DIR_REPLY].packets); in connbytes_mt() 59 what = atomic64_read(&counters[IP_CT_DIR_ORIGINAL].bytes); in connbytes_mt() 62 what = atomic64_read(&counters[IP_CT_DIR_REPLY].bytes); in connbytes_mt() 65 what = atomic64_read(&counters[IP_CT_DIR_ORIGINAL].bytes); in connbytes_mt() 66 what += atomic64_read(&counters[IP_CT_DIR_REPLY].bytes); in connbytes_mt() [all …]
|
/Linux-v5.4/arch/x86/oprofile/ |
D | nmi_int.c | 77 struct op_msr *counters = msrs->counters; in nmi_cpu_save_registers() local 82 if (counters[i].addr) in nmi_cpu_save_registers() 83 rdmsrl(counters[i].addr, counters[i].saved); in nmi_cpu_save_registers() 202 struct op_msr *counters = msrs->counters; in nmi_cpu_save_mpx_registers() local 208 if (counters[i].addr) in nmi_cpu_save_mpx_registers() 209 rdmsrl(counters[i].addr, multiplex[virt].saved); in nmi_cpu_save_mpx_registers() 215 struct op_msr *counters = msrs->counters; in nmi_cpu_restore_mpx_registers() local 221 if (counters[i].addr) in nmi_cpu_restore_mpx_registers() 222 wrmsrl(counters[i].addr, multiplex[virt].saved); in nmi_cpu_restore_mpx_registers() 307 kfree(per_cpu(cpu_msrs, i).counters); in free_msrs() [all …]
|
D | op_model_ppro.c | 38 if (!msrs->counters[i].addr) in ppro_shutdown() 57 msrs->counters[i].addr = MSR_P6_PERFCTR0 + i; in ppro_fill_in_addresses() 108 wrmsrl(msrs->counters[i].addr, -1LL); in ppro_setup_ctrs() 113 if (counter_config[i].enabled && msrs->counters[i].addr) { in ppro_setup_ctrs() 115 wrmsrl(msrs->counters[i].addr, -reset_value[i]); in ppro_setup_ctrs() 136 rdmsrl(msrs->counters[i].addr, val); in ppro_check_ctrs() 140 wrmsrl(msrs->counters[i].addr, -reset_value[i]); in ppro_check_ctrs()
|
D | op_model_amd.c | 295 if (!msrs->counters[i].addr) in op_amd_shutdown() 315 msrs->counters[i].addr = MSR_F15H_PERF_CTR + (i << 1); in op_amd_fill_in_addresses() 319 msrs->counters[i].addr = MSR_K7_PERFCTR0 + i; in op_amd_fill_in_addresses() 342 && msrs->counters[op_x86_virt_to_phys(i)].addr) in op_amd_setup_ctrs() 361 wrmsrl(msrs->counters[i].addr, -1LL); in op_amd_setup_ctrs() 371 wrmsrl(msrs->counters[i].addr, -(u64)reset_value[virt]); in op_amd_setup_ctrs() 391 rdmsrl(msrs->counters[i].addr, val); in op_amd_check_ctrs() 396 wrmsrl(msrs->counters[i].addr, -(u64)reset_value[virt]); in op_amd_check_ctrs()
|
/Linux-v5.4/kernel/gcov/ |
D | gcc_base.c | 46 void __gcov_merge_add(gcov_type *counters, unsigned int n_counters) in __gcov_merge_add() argument 52 void __gcov_merge_single(gcov_type *counters, unsigned int n_counters) in __gcov_merge_single() argument 58 void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters) in __gcov_merge_delta() argument 64 void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters) in __gcov_merge_ior() argument 70 void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters) in __gcov_merge_time_profile() argument 76 void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters) in __gcov_merge_icall_topn() argument
|
D | clang.c | 77 u64 *counters; member 137 void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters) in llvm_gcda_emit_arcs() argument 143 info->counters = counters; in llvm_gcda_emit_arcs() 239 memset(fn->counters, 0, in gcov_info_reset() 240 sizeof(fn->counters[0]) * fn->num_counters); in gcov_info_reset() 294 dfn_ptr->counters[i] += sfn_ptr->counters[i]; in gcov_info_add() 311 cv_size = fn->num_counters * sizeof(fn->counters[0]); in gcov_fn_info_dup() 312 fn_dup->counters = vmalloc(cv_size); in gcov_fn_info_dup() 313 if (!fn_dup->counters) in gcov_fn_info_dup() 315 memcpy(fn_dup->counters, fn->counters, cv_size); in gcov_fn_info_dup() [all …]
|
/Linux-v5.4/lib/ |
D | percpu_counter.c | 67 s32 *pcount = per_cpu_ptr(fbc->counters, cpu); in percpu_counter_set() 87 count = __this_cpu_read(*fbc->counters) + amount; in percpu_counter_add_batch() 92 __this_cpu_sub(*fbc->counters, count - amount); in percpu_counter_add_batch() 95 this_cpu_add(*fbc->counters, amount); in percpu_counter_add_batch() 114 s32 *pcount = per_cpu_ptr(fbc->counters, cpu); in __percpu_counter_sum() 130 fbc->counters = alloc_percpu_gfp(s32, gfp); in __percpu_counter_init() 131 if (!fbc->counters) in __percpu_counter_init() 150 if (!fbc->counters) in percpu_counter_destroy() 160 free_percpu(fbc->counters); in percpu_counter_destroy() 161 fbc->counters = NULL; in percpu_counter_destroy() [all …]
|
/Linux-v5.4/net/ipv4/netfilter/ |
D | arp_tables.c | 229 counter = xt_get_this_cpu_counter(&e->counters); in arpt_do_table() 318 e->counters.pcnt = pos; in mark_source_chains() 344 pos = e->counters.pcnt; in mark_source_chains() 345 e->counters.pcnt = 0; in mark_source_chains() 359 e->counters.pcnt = pos; in mark_source_chains() 378 e->counters.pcnt = pos; in mark_source_chains() 410 if (!xt_percpu_counter_alloc(alloc_state, &e->counters)) in find_check_entry() 429 xt_percpu_counter_free(&e->counters); in find_check_entry() 492 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks() 509 xt_percpu_counter_free(&e->counters); in cleanup_entry() [all …]
|
D | ip_tables.c | 298 counter = xt_get_this_cpu_counter(&e->counters); in ipt_do_table() 384 e->counters.pcnt = pos; in mark_source_chains() 408 pos = e->counters.pcnt; in mark_source_chains() 409 e->counters.pcnt = 0; in mark_source_chains() 423 e->counters.pcnt = pos; in mark_source_chains() 442 e->counters.pcnt = pos; in mark_source_chains() 527 if (!xt_percpu_counter_alloc(alloc_state, &e->counters)) in find_check_entry() 567 xt_percpu_counter_free(&e->counters); in find_check_entry() 631 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks() 655 xt_percpu_counter_free(&e->counters); in cleanup_entry() [all …]
|
/Linux-v5.4/drivers/md/ |
D | md-faulty.c | 78 atomic_t counters[Modes]; member 88 atomic_read(&conf->counters[mode]) <= 0) in check_mode() 92 if (atomic_dec_and_test(&conf->counters[mode])) { in check_mode() 94 atomic_set(&conf->counters[mode], conf->period[mode]); in check_mode() 171 if (atomic_read(&conf->counters[WriteAll])) { in faulty_make_request() 226 if ((n=atomic_read(&conf->counters[WriteTransient])) != 0) in faulty_status() 230 if ((n=atomic_read(&conf->counters[ReadTransient])) != 0) in faulty_status() 234 if ((n=atomic_read(&conf->counters[WritePersistent])) != 0) in faulty_status() 238 if ((n=atomic_read(&conf->counters[ReadPersistent])) != 0) in faulty_status() 243 if ((n=atomic_read(&conf->counters[ReadFixable])) != 0) in faulty_status() [all …]
|
/Linux-v5.4/net/ipv6/netfilter/ |
D | ip6_tables.c | 321 counter = xt_get_this_cpu_counter(&e->counters); in ip6t_do_table() 402 e->counters.pcnt = pos; in mark_source_chains() 426 pos = e->counters.pcnt; in mark_source_chains() 427 e->counters.pcnt = 0; in mark_source_chains() 441 e->counters.pcnt = pos; in mark_source_chains() 460 e->counters.pcnt = pos; in mark_source_chains() 546 if (!xt_percpu_counter_alloc(alloc_state, &e->counters)) in find_check_entry() 585 xt_percpu_counter_free(&e->counters); in find_check_entry() 649 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks() 672 xt_percpu_counter_free(&e->counters); in cleanup_entry() [all …]
|
/Linux-v5.4/tools/perf/util/ |
D | values.c | 33 values->counters = 0; in perf_read_values_init() 60 for (i = 0; i < values->counters; i++) in perf_read_values_destroy() 167 for (i = 0; i < values->counters; i++) in perf_read_values__findnew_counter() 171 if (values->counters == values->counters_max) { in perf_read_values__findnew_counter() 177 i = values->counters++; in perf_read_values__findnew_counter() 208 counterwidth = malloc(values->counters * sizeof(*counterwidth)); in perf_read_values__display_pretty() 215 for (j = 0; j < values->counters; j++) in perf_read_values__display_pretty() 226 for (j = 0; j < values->counters; j++) { in perf_read_values__display_pretty() 234 for (j = 0; j < values->counters; j++) in perf_read_values__display_pretty() 241 for (j = 0; j < values->counters; j++) in perf_read_values__display_pretty() [all …]
|
/Linux-v5.4/Documentation/core-api/ |
D | local_ops.rst | 30 counters. They minimize the performance cost of standard atomic operations by 34 Having fast per CPU atomic counters is interesting in many cases: it does not 36 coherent counters in NMI handlers. It is especially useful for tracing purposes 37 and for various performance monitoring counters. 95 static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0); 107 local_inc(&get_cpu_var(counters)); 108 put_cpu_var(counters); 113 local_inc(this_cpu_ptr(&counters)); 117 Reading the counters 120 Those local counters can be read from foreign CPUs to sum the count. Note that [all …]
|
/Linux-v5.4/drivers/staging/speakup/ |
D | keyhelp.c | 51 u_char *kp, counters[MAXFUNCS], ch, ch1; in build_key_data() local 56 memset(counters, 0, sizeof(counters)); in build_key_data() 66 counters[*kp]++; in build_key_data() 70 if (counters[i] == 0) in build_key_data() 73 offset += (counters[i] + 1); in build_key_data() 90 counters[ch1]--; in build_key_data() 94 p_key = key_data + offset + counters[ch1]; in build_key_data()
|
/Linux-v5.4/tools/perf/ |
D | design.txt | 5 Performance counters are special hardware registers available on most modern 13 hardware capabilities. It provides per task and per CPU counters, counter 15 provides "virtual" 64-bit counters, regardless of the width of the 16 underlying hardware counters. 18 Performance counters are accessed via special file descriptors. 32 Multiple counters can be kept open at a time, and the counters 127 * Special "software" counters provided by the kernel, even if the hardware 128 * does not support performance counters. These counters measure various 149 Counters come in two flavours: counting counters and sampling 150 counters. A "counting" counter is one that is used for counting the [all …]
|
/Linux-v5.4/samples/bpf/ |
D | tracex6_kern.c | 6 struct bpf_map_def SEC("maps") counters = { 32 count = bpf_perf_event_read(&counters, key); in bpf_prog1() 53 error = bpf_perf_event_read_value(&counters, key, &buf, sizeof(buf)); in bpf_prog2()
|
/Linux-v5.4/Documentation/admin-guide/device-mapper/ |
D | statistics.rst | 14 The I/O statistics counters for each step-sized area of a region are 16 Documentation/admin-guide/iostats.rst). But two extra counters (12 and 13) are 19 histogram of latencies. All these counters may be accessed by sending 111 Clear all the counters except the in-flight i/o counters. 133 Print counters for each step-sized area of a region. 149 counters 151 The first 11 counters have the same meaning as 168 Additional counters: 174 Atomically print and then clear all the counters except the 175 in-flight i/o counters. Useful when the client consuming the
|
/Linux-v5.4/drivers/crypto/nx/ |
D | nx-842-pseries.c | 104 struct ibm_nx842_counters *counters; member 115 atomic64_inc(&dev->counters->_x); \ 374 ibm_nx842_incr_hist(local_devdata->counters->comp_times, in nx842_pseries_compress() 505 ibm_nx842_incr_hist(local_devdata->counters->decomp_times, in nx842_pseries_decompress() 739 new_devdata->counters = old_devdata->counters; in nx842_OF_upd() 860 atomic64_read(&local_devdata->counters->_name)); \ 903 times = local_devdata->counters->comp_times; in nx842_timehist_show() 905 times = local_devdata->counters->decomp_times; in nx842_timehist_show() 984 new_devdata->counters = kzalloc(sizeof(*new_devdata->counters), in nx842_probe() 986 if (!new_devdata->counters) { in nx842_probe() [all …]
|
/Linux-v5.4/Documentation/input/devices/ |
D | amijoy.rst | 121 (4 counters total). The bit usage for both left and right 168 JOYTEST 036 W Denise Write to all 4 joystick-mouse counters at once. 189 These addresses each read a pair of 8 bit pot counters. 190 (4 counters total). The bit assignment for both 191 addresses is shown below. The counters are stopped by signals 218 the counters will count proportionally faster. 239 that shares the same 4 pins as the 4 pot counters above. 262 | 00 | START | Start pots (dump capacitors,start counters) |
|
/Linux-v5.4/drivers/edac/ |
D | edac_device.h | 121 struct edac_device_counter counters; /* basic UE and CE counters */ member 137 struct edac_device_counter counters; /* instance counters */ member 221 struct edac_device_counter counters; member
|
/Linux-v5.4/drivers/infiniband/hw/qib/ |
D | qib_fs.c | 149 u64 *counters; in dev_counters_read() local 153 avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters); in dev_counters_read() 154 return simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read() 195 u64 *counters; in portcntrs_1_read() local 199 avail = dd->f_read_portcntrs(dd, *ppos, 0, NULL, &counters); in portcntrs_1_read() 200 return simple_read_from_buffer(buf, count, ppos, counters, avail); in portcntrs_1_read() 207 u64 *counters; in portcntrs_2_read() local 211 avail = dd->f_read_portcntrs(dd, *ppos, 1, NULL, &counters); in portcntrs_2_read() 212 return simple_read_from_buffer(buf, count, ppos, counters, avail); in portcntrs_2_read()
|
/Linux-v5.4/drivers/staging/comedi/drivers/ |
D | addi_apci_1564.c | 164 unsigned long counters; /* base address of 32-bit counters */ member 191 if (devpriv->counters) { in apci1564_reset() 192 unsigned long iobase = devpriv->counters + ADDI_TCW_CTRL_REG; in apci1564_reset() 237 if (devpriv->counters) { in apci1564_interrupt() 241 iobase = devpriv->counters + APCI1564_COUNTER(chan); in apci1564_interrupt() 571 unsigned long iobase = devpriv->counters + APCI1564_COUNTER(chan); in apci1564_counter_insn_config() 621 unsigned long iobase = devpriv->counters + APCI1564_COUNTER(chan); in apci1564_counter_insn_write() 640 unsigned long iobase = devpriv->counters + APCI1564_COUNTER(chan); in apci1564_counter_insn_read() 679 devpriv->counters = pci_resource_start(pcidev, 1); in apci1564_auto_attach() 745 if (devpriv->counters) { in apci1564_auto_attach()
|
/Linux-v5.4/arch/mips/kernel/ |
D | perf_event_mipsxx.c | 142 static unsigned int counters_total_to_per_cpu(unsigned int counters) in counters_total_to_per_cpu() argument 144 return counters >> vpe_shift(); in counters_total_to_per_cpu() 766 int counters; in n_counters() local 770 counters = 2; in n_counters() 776 counters = 4; in n_counters() 780 counters = __n_counters(); in n_counters() 783 return counters; in n_counters() 788 int counters = (int)(long)arg; in reset_counters() local 789 switch (counters) { in reset_counters() 1385 unsigned int counters = mipspmu.num_counters; in mipsxx_pmu_handle_shared_irq() local [all …]
|