| /OK3568_Linux_fs/kernel/arch/mips/oprofile/ |
| H A D | op_model_mipsxx.c | 28 * XLR has only one set of counters per core. Designate the 45 * The number of bits to shift to convert between counters per core and 46 * counters per VPE. There is no reasonable interface atm to obtain the 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 [all …]
|
| /OK3568_Linux_fs/kernel/drivers/infiniband/core/ |
| H A 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 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 …]
|
| /OK3568_Linux_fs/kernel/net/netfilter/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/tools/perf/ |
| H A D | design.txt | 2 Performance Counters for Linux 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 112 on all CPUs that implement Performance Counters support under Linux, 127 * Special "software" counters provided by the kernel, even if the hardware 128 * does not support performance counters. These counters measure various [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/midgard/ |
| H A D | mali_kbase_gator_api.h | 22 * @brief This file describes the API used by Gator to fetch hardware counters. 39 * the counters you want enabled. The enables can all be set for simplicity in 58 * 6] Process the counters stored in the buffer pointed to by ... 62 * In pseudo code you can find all of the counters via this approach: 74 * # Skip reserved type blocks - they contain no counters at all 82 * # Iterate over the names of the counters in this block type 101 * analysis is to AVERAGE shader core counters, but SUM L2 cache and MMU 102 * counters. 104 * 7] Goto 4, repeating until you want to stop collecting counters. 126 /* the bitmask of enabled hardware counters for each counter block */ [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/core-api/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/aquantia/atlantic/macsec/ |
| H A D | macsec_api.h | 265 /*! Read the counters for the specified SC, and unpack them into the 266 * fields of counters. 267 * counters - [OUT] The raw table row data will be unpacked here. 271 struct aq_mss_egress_sc_counters *counters, 274 /*! Read the counters for the specified SA, and unpack them into the 275 * fields of counters. 276 * counters - [OUT] The raw table row data will be unpacked here. 280 struct aq_mss_egress_sa_counters *counters, 283 /*! Read the counters for the common egress counters, and unpack them 284 * into the fields of counters. [all …]
|
| H A D | macsec_api.c | 1825 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 …]
|
| /OK3568_Linux_fs/kernel/Documentation/arm64/ |
| H A D | amu.rst | 22 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 …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/oprofile/ |
| H A D | op_model_7450.c | 51 /* Unfreezes the counters on this CPU, enables the interrupt, 52 * enables the counters to trigger the interrupt, and sets the 53 * counters to only count when the mark bit is not set. 65 /* Disables the counters on this CPU, and freezes them */ 76 /* Configures the counters on this CPU based on the global 80 /* freeze all counters */ in fsl7450_cpu_setup() 99 /* Our counters count up, and "count" refers to in fsl7450_reg_setup() 103 * Then we set the events on the enabled counters */ in fsl7450_reg_setup() 107 /* Set events for Counters 1 & 2 */ in fsl7450_reg_setup() 118 /* Set events for Counters 3-6 */ in fsl7450_reg_setup() [all …]
|
| /OK3568_Linux_fs/kernel/fs/xfs/scrub/ |
| H A D | fscounters.c | 21 * FS Summary Counters 27 * Then we compare what we computed against the in-core counters. 29 * However, the reality is that summary counters are a tricky beast to check. 40 * structures as quickly as it can. We snapshot the percpu counters before and 47 * values, the percpu counters should be fairly close to each other. However, 54 * contents and trust that the incore counters match the ondisk counters. (The 56 * summary counters after checking all AG headers). Do this from the setup 132 /* We must get the incore counters set up before we can proceed. */ in xchk_setup_fscounters() 139 * likelihood of background perturbations to the counters throwing off in xchk_setup_fscounters() 148 * Calculate what the global in-core counters ought to be from the incore [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | nfs_iostat.h | 13 * These counters are not meant to be human-readable, but are meant 15 * "iostat". As such, the counters are sampled by the tools over 28 * NFS byte counters 40 * These counters give a view of the data throughput into and out 46 * These counters can also help characterize which access methods 53 * NFS page counters 58 * NB: When adding new byte counters, please include the measured 75 * NFS event counters 77 * These counters provide a low-overhead way of monitoring client 78 * activity without enabling NFS trace debugging. The counters [all …]
|
| /OK3568_Linux_fs/kernel/net/ipv4/netfilter/ |
| H A 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() 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() 493 /* Clear counters and comefrom */ in check_entry_size_and_hooks() 494 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks() [all …]
|
| H A 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() 630 /* Clear counters and comefrom */ in check_entry_size_and_hooks() 631 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks() [all …]
|
| /OK3568_Linux_fs/kernel/lib/ |
| H A D | percpu_counter.c | 3 * Fast batching percpu counters. 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() 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() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/mali400/mali/linux/ |
| H A D | mali_linux_trace.h | 68 * Hardware counters belonging to the vertex or fragment processor are 70 * counters are reported continuously. 94 * Define a tracepoint used to send a bundle of software counters. 96 * @param counters The bundle of counters. 100 TP_PROTO(pid_t pid, pid_t tid, void *surface_id, unsigned int *counters), 102 TP_ARGS(pid, tid, surface_id, counters), 108 __field(unsigned int *, counters) 115 __entry->counters = counters; 118 TP_printk("counters were %s", __entry->counters == NULL ? "NULL" : "not NULL")
|
| /OK3568_Linux_fs/kernel/arch/x86/oprofile/ |
| H A 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() 251 * The check should be sufficient since counters are used [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/bifrost/hwcnt/ |
| H A D | mali_kbase_hwcnt_context.h | 71 * before counters are disabled via the backend interface. 73 * Subsequent dumps via the accumulator while counters are disabled will first 74 * return the accumulated dump, then will return dumps with zeroed counters. 76 * After this function call returns, it is guaranteed that counters will not be 87 * This function will only succeed if hardware counters are effectively already 89 * non-zero, or the accumulator has no counters set. 91 * After this function call returns true, it is guaranteed that counters will 103 * an accumulator has been acquired, then counters will be re-enabled via the 106 * If an accumulator has been acquired and enabling counters fails for some 120 * hardware counters. [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/bifrost/ipa/backend/ |
| H A D | mali_kbase_ipa_counter_common_csf.h | 28 /* Maximum number of HW counters used by the IPA counter model. */ 38 * @top_level_cntrs_def: Array of description of HW counters used by the IPA 41 * @shader_cores_cntrs_def: Array of description of HW counters used by the IPA 44 * @counter_coeffs: Buffer to store coefficient value used for HW counters 45 * @counter_values: Buffer to store the accumulated value of HW counters 47 * @num_counters: Number of counters queried from kbase_ipa_control. 97 * kbase_ipa_counter_dynamic_coeff() - calculate dynamic power based on HW counters 111 * kbase_ipa_counter_reset_data() - Reset the counters data used for dynamic 115 * Retrieve the accumulated value of HW counters from the kbase_ipa_control 125 * @top_level_cntrs_def: Array corresponding to the HW counters used in the [all …]
|
| /OK3568_Linux_fs/kernel/drivers/infiniband/hw/mlx5/ |
| H A D | counters.c | 8 #include "counters.h" 78 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() 106 /* do the pass over the counters data array to assign according to the 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 [all …]
|
| /OK3568_Linux_fs/kernel/net/ipv6/netfilter/ |
| H A D | ip6_tables.c | 322 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() 649 /* Clear counters and comefrom */ in check_entry_size_and_hooks() 650 e->counters = ((struct xt_counters) { 0, 0 }); in check_entry_size_and_hooks() [all …]
|
| /OK3568_Linux_fs/kernel/tools/perf/util/ |
| H A D | values.c | 30 pr_debug("failed to allocate read_values counters arrays"); in perf_read_values_init() 33 values->counters = 0; in perf_read_values_init() 60 for (i = 0; i < values->counters; i++) in perf_read_values_destroy() 107 pr_debug("failed to allocate read_values counters array"); in perf_read_values__findnew_thread() 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() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-tegra/ |
| H A D | ivc.c | 27 * established state, indicating that has cleared the counters in our 34 * allowed to clear the counters it owns asynchronously with respect to 44 * return to the established state once it has cleared its counters. 152 * Invalid cases where the counters indicate that the queue is over in tegra_ivc_channel_full() 188 * transmit counters until we've acknowledged its synchronization in tegra_ivc_check_read() 341 * SYNC ACK reset counters; move to EST; notify 342 * SYNC SYNC reset counters; move to ACK; notify 345 * ACK SYNC reset counters; move to ACK; notify 348 * EST SYNC reset counters; move to ACK; notify 370 * Reset tx_channel counters. The remote end is in the SYNC in tegra_ivc_channel_notified() [all …]
|
| /OK3568_Linux_fs/kernel/kernel/gcov/ |
| H A D | clang.c | 79 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/md/ |
| H A 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 …]
|