Home
last modified time | relevance | path

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

12345678910>>...13

/linux/drivers/infiniband/core/
A Duverbs_std_types_counters.c48 ret = counters->device->ops.destroy_counters(counters); in uverbs_free_counters()
51 kfree(counters); in uverbs_free_counters()
61 struct ib_counters *counters; in UVERBS_HANDLER() local
73 if (!counters) in UVERBS_HANDLER()
76 counters->device = ib_dev; in UVERBS_HANDLER()
77 counters->uobject = uobj; in UVERBS_HANDLER()
78 uobj->object = counters; in UVERBS_HANDLER()
79 atomic_set(&counters->usecnt, 0); in UVERBS_HANDLER()
83 kfree(counters); in UVERBS_HANDLER()
93 struct ib_counters *counters = in UVERBS_HANDLER() local
[all …]
/linux/net/netfilter/
A Dxt_connbytes.c30 const struct nf_conn_counter *counters; in connbytes_mt() local
40 counters = acct->counter; in connbytes_mt()
48 what = atomic64_read(&counters[IP_CT_DIR_REPLY].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()
77 bytes = atomic64_read(&counters[IP_CT_DIR_REPLY].bytes); in connbytes_mt()
82 atomic64_read(&counters[IP_CT_DIR_REPLY].bytes); in connbytes_mt()
[all …]
/linux/drivers/net/ethernet/aquantia/atlantic/macsec/
A Dmacsec_api.c1869 memset(counters, 0, sizeof(*counters)); in aq_mss_get_egress_sc_counters()
1923 memset(counters, 0, sizeof(*counters)); in aq_mss_get_egress_sa_counters()
1952 counters->untagged_pkts[0] = in get_egress_common_counters()
1954 counters->untagged_pkts[1] = in get_egress_common_counters()
1985 memset(counters, 0, sizeof(*counters)); in aq_mss_get_egress_common_counters()
2162 memset(counters, 0, sizeof(*counters)); in aq_mss_get_ingress_sa_counters()
2206 counters->untagged_pkts[0] = in get_ingress_common_counters()
2208 counters->untagged_pkts[1] = in get_ingress_common_counters()
2266 counters->too_long_pkts[0] = in get_ingress_common_counters()
2268 counters->too_long_pkts[1] = in get_ingress_common_counters()
[all …]
A 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);
/linux/Documentation/translations/zh_CN/core-api/
A Dlocal_ops.rst93 static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0);
105 local_inc(&get_cpu_var(counters));
106 put_cpu_var(counters);
110 local_inc(this_cpu_ptr(&counters));
123 sum += local_read(&per_cpu(counters, cpu));
143 static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0);
152 local_inc(this_cpu_ptr(&counters));
157 * local_inc(&get_cpu_var(counters));
158 * put_cpu_var(counters);
166 /* Increment the counters */
[all …]
/linux/lib/
A Dpercpu_counter.c67 s32 *pcount = per_cpu_ptr(fbc->counters, cpu); in percpu_counter_set()
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()
179 free_percpu(fbc->counters); in percpu_counter_destroy()
180 fbc->counters = NULL; in percpu_counter_destroy()
[all …]
/linux/kernel/gcov/
A Dclang.c75 u64 *counters; member
128 void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters) in llvm_gcda_emit_arcs() argument
134 info->counters = counters; in llvm_gcda_emit_arcs()
230 memset(fn->counters, 0, in gcov_info_reset()
231 sizeof(fn->counters[0]) * fn->num_counters); in gcov_info_reset()
282 dfn_ptr->counters[i] += sfn_ptr->counters[i]; in gcov_info_add()
295 cv_size = fn->num_counters * sizeof(fn->counters[0]); in gcov_fn_info_dup()
296 fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL); in gcov_fn_info_dup()
297 if (!fn_dup->counters) { in gcov_fn_info_dup()
302 memcpy(fn_dup->counters, fn->counters, cv_size); in gcov_fn_info_dup()
[all …]
A 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
/linux/net/ipv4/netfilter/
A Darp_tables.c662 if (counters == NULL) in alloc_counters()
667 return counters; in alloc_counters()
682 if (IS_ERR(counters)) in copy_entries_to_user()
699 &counters[num], in copy_entries_to_user()
713 vfree(counters); in copy_entries_to_user()
895 if (!counters) { in __do_replace()
939 vfree(counters); in __do_replace()
946 vfree(counters); in __do_replace()
1137 memcpy(&de->counters, &e->counters, sizeof(e->counters)); in compat_copy_entry_from_user()
1311 copy_to_user(&ce->counters, &counters[i], in compat_copy_entry_to_user()
[all …]
A Dip_tables.c803 if (counters == NULL) in alloc_counters()
808 return counters; in alloc_counters()
824 if (IS_ERR(counters)) in copy_entries_to_user()
843 &counters[num], in copy_entries_to_user()
868 vfree(counters); in copy_entries_to_user()
1050 if (!counters) { in __do_replace()
1093 vfree(counters); in __do_replace()
1100 vfree(counters); in __do_replace()
1231 copy_to_user(&ce->counters, &counters[i], in compat_copy_entry_to_user()
1367 memcpy(&de->counters, &e->counters, sizeof(e->counters)); in compat_copy_entry_from_user()
[all …]
/linux/drivers/md/
A 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()
230 if ((n=atomic_read(&conf->counters[ReadTransient])) != 0) in faulty_status()
243 if ((n=atomic_read(&conf->counters[ReadFixable])) != 0) in faulty_status()
247 if ((n=atomic_read(&conf->counters[WriteAll])) != 0) in faulty_status()
270 atomic_set(&conf->counters[i], 0); in faulty_reshape()
275 atomic_set(&conf->counters[mode], count); in faulty_reshape()
[all …]
/linux/Documentation/arm64/
A 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.
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.
74 commonly, the counters will read as 0, indicating that they are not
91 Auxiliary platform specific counters can be accessed using
[all …]
/linux/net/ipv6/netfilter/
A Dip6_tables.c819 if (counters == NULL) in alloc_counters()
824 return counters; in alloc_counters()
840 if (IS_ERR(counters)) in copy_entries_to_user()
859 &counters[num], in copy_entries_to_user()
884 vfree(counters); in copy_entries_to_user()
1067 if (!counters) { in __do_replace()
1110 vfree(counters); in __do_replace()
1117 vfree(counters); in __do_replace()
1247 copy_to_user(&ce->counters, &counters[i], in compat_copy_entry_to_user()
1383 memcpy(&de->counters, &e->counters, sizeof(e->counters)); in compat_copy_entry_from_user()
[all …]
/linux/fs/nfsd/
A Dstats.c87 int nfsd_percpu_counters_init(struct percpu_counter counters[], int num) in nfsd_percpu_counters_init() argument
92 err = percpu_counter_init(&counters[i], 0, GFP_KERNEL); in nfsd_percpu_counters_init()
98 percpu_counter_destroy(&counters[i-1]); in nfsd_percpu_counters_init()
103 void nfsd_percpu_counters_reset(struct percpu_counter counters[], int num) in nfsd_percpu_counters_reset() argument
108 percpu_counter_set(&counters[i], 0); in nfsd_percpu_counters_reset()
111 void nfsd_percpu_counters_destroy(struct percpu_counter counters[], int num) in nfsd_percpu_counters_destroy() argument
116 percpu_counter_destroy(&counters[i]); in nfsd_percpu_counters_destroy()
/linux/Documentation/core-api/
A Dlocal_ops.rst37 and for various performance monitoring counters.
107 local_inc(&get_cpu_var(counters));
108 put_cpu_var(counters);
113 local_inc(this_cpu_ptr(&counters));
117 Reading the counters
126 sum += local_read(&per_cpu(counters, cpu));
158 local_inc(this_cpu_ptr(&counters));
163 * local_inc(&get_cpu_var(counters));
164 * put_cpu_var(counters);
172 /* Increment the counters */
[all …]
/linux/tools/perf/util/
A 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()
177 i = values->counters++; in perf_read_values__findnew_counter()
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()
269 for (j = 0; j < values->counters; j++) { in perf_read_values__display_raw()
278 for (j = 0; j < values->counters; j++) { in perf_read_values__display_raw()
[all …]
/linux/drivers/accessibility/speakup/
A 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()
/linux/drivers/staging/wfx/
A 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()
119 for (i = 0; i < ARRAY_SIZE(counters[0].reserved); i++) in wfx_counters_show()
121 le32_to_cpu(counters[2].reserved[i]), in wfx_counters_show()
122 le32_to_cpu(counters[0].reserved[i]), in wfx_counters_show()
123 le32_to_cpu(counters[1].reserved[i])); in wfx_counters_show()
/linux/drivers/scsi/elx/efct/
A Defct_xport.c118 counters[EFCT_HW_LINK_STAT_CRC_COUNT].counter; in efct_xport_link_stats_cb()
130 counters[EFCT_HW_HOST_STAT_TX_KBYTE_COUNT].counter; in efct_xport_host_stats_cb()
132 counters[EFCT_HW_HOST_STAT_RX_KBYTE_COUNT].counter; in efct_xport_host_stats_cb()
134 counters[EFCT_HW_HOST_STAT_TX_FRAME_COUNT].counter; in efct_xport_host_stats_cb()
136 counters[EFCT_HW_HOST_STAT_RX_FRAME_COUNT].counter; in efct_xport_host_stats_cb()
143 struct efct_hw_link_stat_counts *counters, in efct_xport_async_link_stats_cb() argument
157 counters[EFCT_HW_LINK_STAT_CRC_COUNT].counter; in efct_xport_async_link_stats_cb()
162 struct efct_hw_host_stat_counts *counters, in efct_xport_async_host_stats_cb() argument
168 counters[EFCT_HW_HOST_STAT_TX_KBYTE_COUNT].counter; in efct_xport_async_host_stats_cb()
170 counters[EFCT_HW_HOST_STAT_RX_KBYTE_COUNT].counter; in efct_xport_async_host_stats_cb()
[all …]
/linux/tools/perf/
A Ddesign.txt5 Performance counters are special hardware registers available on most modern
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
131 * does not support performance counters. These counters measure various
152 Counters come in two flavours: counting counters and sampling
222 counters.
249 pid < 0: all tasks are counted (per cpu counters)
301 * Bits needed to read the hw counters in user-space.
[all …]
/linux/drivers/gpu/drm/v3d/
A Dv3d_perfmon.c37 u32 channel = V3D_SET_FIELD(perfmon->counters[i], V3D_PCTR_S0); in v3d_perfmon_start()
40 channel |= V3D_SET_FIELD(i < ncounters ? perfmon->counters[i] : 0, in v3d_perfmon_start()
43 channel |= V3D_SET_FIELD(i < ncounters ? perfmon->counters[i] : 0, in v3d_perfmon_start()
46 channel |= V3D_SET_FIELD(i < ncounters ? perfmon->counters[i] : 0, in v3d_perfmon_start()
133 if (req->counters[i] >= V3D_PERFCNT_NUM) in v3d_perfmon_create_ioctl()
143 perfmon->counters[i] = req->counters[i]; in v3d_perfmon_create_ioctl()
/linux/mm/kfence/
A Dcore.c154 static atomic_long_t counters[KFENCE_COUNTER_COUNT]; variable
319 atomic_long_inc(&counters[KFENCE_COUNTER_BUGS]); in check_canary_byte()
374 atomic_long_inc(&counters[KFENCE_COUNTER_SKIP_CAPACITY]); in kfence_guarded_alloc()
451 atomic_long_inc(&counters[KFENCE_COUNTER_ALLOCATED]); in kfence_guarded_alloc()
452 atomic_long_inc(&counters[KFENCE_COUNTER_ALLOCS]); in kfence_guarded_alloc()
467 atomic_long_inc(&counters[KFENCE_COUNTER_BUGS]); in kfence_guarded_free()
518 atomic_long_dec(&counters[KFENCE_COUNTER_ALLOCATED]); in kfence_guarded_free()
519 atomic_long_inc(&counters[KFENCE_COUNTER_FREES]); in kfence_guarded_free()
522 atomic_long_inc(&counters[KFENCE_COUNTER_ZOMBIES]); in kfence_guarded_free()
905 atomic_long_inc(&counters[KFENCE_COUNTER_SKIP_COVERED]); in __kfence_alloc()
[all …]
/linux/Documentation/powerpc/
A 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
/linux/Documentation/admin-guide/perf/
A 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.
/linux/tools/perf/tests/shell/
A Dstat_bpf_counters.sh25 if ! perf stat --bpf-counters true > /dev/null 2>&1; then
28 perf --no-pager stat --bpf-counters true || true
38 bpf_cycles=$(perf stat --no-big-num --bpf-counters -e cycles -- perf bench sched messaging -g 1 -l …

Completed in 50 milliseconds

12345678910>>...13