Home
last modified time | relevance | path

Searched refs:counters (Results 1 – 25 of 309) sorted by relevance

12345678910>>...13

/kernel/linux/linux-5.10/arch/mips/oprofile/
Dop_model_mipsxx.c72 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 …]
/kernel/linux/linux-5.10/drivers/infiniband/core/
Duverbs_std_types_counters.c42 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 ret = counters->device->ops.destroy_counters(counters); in uverbs_free_counters()
52 kfree(counters); in uverbs_free_counters()
62 struct ib_counters *counters; in UVERBS_HANDLER() local
73 counters = rdma_zalloc_drv_obj(ib_dev, ib_counters); in UVERBS_HANDLER()
74 if (!counters) in UVERBS_HANDLER()
77 counters->device = ib_dev; in UVERBS_HANDLER()
78 counters->uobject = uobj; in UVERBS_HANDLER()
79 uobj->object = counters; in UVERBS_HANDLER()
[all …]
/kernel/linux/linux-5.10/net/netfilter/
Dxt_connbytes.c30 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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/aquantia/atlantic/macsec/
Dmacsec_api.c1825 struct aq_mss_egress_sc_counters *counters, in get_egress_sc_counters() argument
1837 counters->sc_protected_pkts[0] = in get_egress_sc_counters()
1839 counters->sc_protected_pkts[1] = in get_egress_sc_counters()
1845 counters->sc_encrypted_pkts[0] = in get_egress_sc_counters()
1847 counters->sc_encrypted_pkts[1] = in get_egress_sc_counters()
1853 counters->sc_protected_octets[0] = in get_egress_sc_counters()
1855 counters->sc_protected_octets[1] = in get_egress_sc_counters()
1861 counters->sc_encrypted_octets[0] = in get_egress_sc_counters()
1863 counters->sc_encrypted_octets[1] = in get_egress_sc_counters()
1870 struct aq_mss_egress_sc_counters *counters, in aq_mss_get_egress_sc_counters() argument
[all …]
Dmacsec_api.h271 struct aq_mss_egress_sc_counters *counters,
280 struct aq_mss_egress_sa_counters *counters,
288 struct aq_mss_egress_common_counters *counters);
299 struct aq_mss_ingress_sa_counters *counters,
307 struct aq_mss_ingress_common_counters *counters);
/kernel/linux/linux-5.10/lib/
Dpercpu_counter.c67 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()
113 count = __this_cpu_read(*fbc->counters); in percpu_counter_sync()
115 __this_cpu_sub(*fbc->counters, count); in percpu_counter_sync()
133 s32 *pcount = per_cpu_ptr(fbc->counters, cpu); in __percpu_counter_sum()
149 fbc->counters = alloc_percpu_gfp(s32, gfp); in __percpu_counter_init()
150 if (!fbc->counters) in __percpu_counter_init()
169 if (!fbc->counters) in percpu_counter_destroy()
[all …]
/kernel/linux/linux-5.10/arch/x86/oprofile/
Dnmi_int.c77 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 …]
Dop_model_ppro.c38 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()
Dop_model_amd.c295 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()
/kernel/linux/linux-5.10/kernel/gcov/
Dgcc_base.c46 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
Dclang.c79 u64 *counters; member
167 void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters) in llvm_gcda_emit_arcs() argument
173 info->counters = counters; in llvm_gcda_emit_arcs()
269 memset(fn->counters, 0, in gcov_info_reset()
270 sizeof(fn->counters[0]) * fn->num_counters); in gcov_info_reset()
329 dfn_ptr->counters[i] += sfn_ptr->counters[i]; in gcov_info_add()
349 cv_size = fn->num_counters * sizeof(fn->counters[0]); in gcov_fn_info_dup()
350 fn_dup->counters = vmalloc(cv_size); in gcov_fn_info_dup()
351 if (!fn_dup->counters) in gcov_fn_info_dup()
353 memcpy(fn_dup->counters, fn->counters, cv_size); in gcov_fn_info_dup()
[all …]
/kernel/linux/linux-5.10/net/ipv4/netfilter/
Darp_tables.c229 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()
412 if (!xt_percpu_counter_alloc(alloc_state, &e->counters)) in find_check_entry()
431 xt_percpu_counter_free(&e->counters); in find_check_entry()
494 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks()
512 xt_percpu_counter_free(&e->counters); in cleanup_entry()
[all …]
Dip_tables.c298 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 …]
/kernel/linux/linux-5.10/drivers/md/
Dmd-faulty.c78 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 …]
/kernel/linux/linux-5.10/Documentation/arm64/
Damu.rst22 counters intended for system management use. The AMU extension provides a
27 of four fixed and architecturally defined 64-bit event counters.
37 When in WFI or WFE these counters do not increment.
40 event counters. Future versions of the architecture may use this space to
41 implement additional architected event counters.
44 64-bit event counters.
46 On cold reset all counters reset to 0.
59 counters, only the presence of the extension.
66 - Enable the counters. If not enabled these will read as 0.
67 - Save/restore the counters before/after the CPU is being put/brought up
[all …]
/kernel/linux/linux-5.10/net/ipv6/netfilter/
Dip6_tables.c322 counter = xt_get_this_cpu_counter(&e->counters); in ip6t_do_table()
403 e->counters.pcnt = pos; in mark_source_chains()
427 pos = e->counters.pcnt; in mark_source_chains()
428 e->counters.pcnt = 0; in mark_source_chains()
442 e->counters.pcnt = pos; in mark_source_chains()
461 e->counters.pcnt = pos; in mark_source_chains()
547 if (!xt_percpu_counter_alloc(alloc_state, &e->counters)) in find_check_entry()
586 xt_percpu_counter_free(&e->counters); in find_check_entry()
650 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks()
673 xt_percpu_counter_free(&e->counters); in cleanup_entry()
[all …]
/kernel/linux/linux-5.10/tools/perf/util/
Dvalues.c33 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 …]
/kernel/linux/linux-5.10/Documentation/core-api/
Dlocal_ops.rst30 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 …]
/kernel/linux/linux-5.10/drivers/accessibility/speakup/
Dkeyhelp.c51 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()
/kernel/linux/linux-5.10/drivers/staging/wfx/
Ddebug.c66 struct hif_mib_extended_count_table counters[3]; in wfx_counters_show() local
68 for (i = 0; i < ARRAY_SIZE(counters); i++) { in wfx_counters_show()
69 ret = hif_get_counters_table(wdev, i, counters + i); in wfx_counters_show()
81 le32_to_cpu(counters[2].count_##name), \ in wfx_counters_show()
82 le32_to_cpu(counters[0].count_##name), \ in wfx_counters_show()
83 le32_to_cpu(counters[1].count_##name)) in wfx_counters_show()
115 for (i = 0; i < ARRAY_SIZE(counters[0].reserved); i++) in wfx_counters_show()
117 le32_to_cpu(counters[2].reserved[i]), in wfx_counters_show()
118 le32_to_cpu(counters[0].reserved[i]), in wfx_counters_show()
119 le32_to_cpu(counters[1].reserved[i])); in wfx_counters_show()
/kernel/linux/linux-5.10/tools/perf/
Ddesign.txt5 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 …]
/kernel/linux/linux-5.10/Documentation/admin-guide/perf/
Dthunderx2-pmu.rst13 The DMC and L3C support up to 4 counters, while the CCPI2 supports up to 8
14 counters. Counters are independently programmable to different events and
15 can be started and stopped individually. None of the counters support an
16 overflow interrupt. DMC and L3C counters are 32-bit and read every 2 seconds.
17 The CCPI2 counters are 64-bit and assumed not to overflow in normal operation.
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx5/
Dcounters.c78 static int mlx5_ib_read_counters(struct ib_counters *counters, in mlx5_ib_read_counters() argument
82 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters); in mlx5_ib_read_counters()
102 ret = mcounters->read_counters(counters->device, &mread_attr); in mlx5_ib_read_counters()
120 static int mlx5_ib_destroy_counters(struct ib_counters *counters) in mlx5_ib_destroy_counters() argument
122 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters); in mlx5_ib_destroy_counters()
124 mlx5_ib_counters_clear_description(counters); in mlx5_ib_destroy_counters()
126 mlx5_fc_destroy(to_mdev(counters->device)->mdev, in mlx5_ib_destroy_counters()
131 static int mlx5_ib_create_counters(struct ib_counters *counters, in mlx5_ib_create_counters() argument
134 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters); in mlx5_ib_create_counters()
555 struct ib_counters *counters, enum mlx5_ib_counters_type counters_type, in counters_set_description() argument
[all …]
/kernel/linux/linux-5.10/Documentation/powerpc/
Dimc.rst17 IMC (In-Memory collection counters) is a hardware monitoring facility that
21 The Nest PMU counters are handled by a Nest IMC microcode which runs in the OCC
25 The Core and Thread IMC PMU counters are handled in the core. Core level PMU
26 counters give us the IMC counters' data per core and thread level PMU counters
27 give us the IMC counters' data per CPU thread.
51 The kernel discovers the IMC counters information in the device tree at the
52 `imc-counters` device node which has a compatible field
53 `ibm,opal-in-memory-counters`. From the device tree, the kernel parses the PMUs
/kernel/linux/linux-5.10/samples/bpf/
Dtracex6_kern.c11 } counters SEC(".maps");
34 count = bpf_perf_event_read(&counters, key); in bpf_prog1()
55 error = bpf_perf_event_read_value(&counters, key, &buf, sizeof(buf)); in bpf_prog2()

12345678910>>...13