Home
last modified time | relevance | path

Searched refs:counts (Results 1 – 25 of 30) sorted by relevance

12

/xnu-11215/tests/
H A Dmonotonic_core.c61 T_EXPECT_GT(counts[1].tcpi_instructions, counts[0].tcpi_instructions, in check_fixed_counts()
63 T_EXPECT_GT(counts[1].tcpi_cycles, counts[0].tcpi_cycles, in check_fixed_counts()
73 struct thsc_cpi counts[2]; variable
88 check_fixed_counts(counts);
109 struct thsc_cpi counts[2];
114 counts[0].tcpi_cycles = start->arg2;
116 counts[1].tcpi_cycles = end->arg2;
118 check_fixed_counts(counts);
142 struct thsc_cpi counts = { 0 }; in spin_thread_self_counts() local
144 (void)thread_selfcounts(THSC_CPI, &counts, sizeof(counts)); in spin_thread_self_counts()
[all …]
H A Dmonotonic_uncore.c270 uint64_t counts[2][CTRS_MAX]; variable
295 uncore_counts(fd, ctr_mask, counts[0]);
299 uncore_counts(fd, ctr_mask, counts[1]);
305 T_EXPECT_GT(counts[1][i], counts[0][i],
307 T_EXPECT_LT(counts[1][i] - counts[0][i], times[1] - times[0],
317 uncore_counts(fd, ctr_mask, counts[0]);
326 uncore_counts(fd, ctr_mask, counts[1]);
330 uint64_t after = counts[1][i * mon];
340 T_EXPECT_GT(counts[1][i * mon] - counts[0][i * mon],
402 uint64_t counts[nctrs * nmonitors]; variable
[all …]
/xnu-11215/bsd/kern/
H A Dsys_recount.c111 return copyout(&counts, buf, MIN(sizeof(counts), size)); in _selfcounts()
115 return copyout(&counts, buf, MIN(sizeof(counts), size)); in _selfcounts()
119 return copyout(&counts, buf, MIN(sizeof(counts), size)); in _selfcounts()
145 counts[i] = _usage_to_cpi(&usages[cpu_kind]); in _selfcounts_perf_level()
147 return copyout(&counts, buf, MIN(sizeof(counts[0]) * counts_len, size)); in _selfcounts_perf_level()
155 return copyout(&counts, buf, MIN(sizeof(counts[0]) * counts_len, size)); in _selfcounts_perf_level()
163 return copyout(&counts, buf, MIN(sizeof(counts[0]) * counts_len, size)); in _selfcounts_perf_level()
220 } counts = { 0 }; in proc_pidthreadcounts() local
234 counts.counts_len = (uint16_t)counts_len; in proc_pidthreadcounts()
244 counts.counts[i] = _usage_to_proc_threadcounts(&usages[cpu_kind]); in proc_pidthreadcounts()
[all …]
/xnu-11215/osfmk/kern/
H A Dkern_monotonic.c103 if (counts) { in mt_mtc_update_fixed_counts()
104 counts[i] = count; in mt_mtc_update_fixed_counts()
107 assert(counts != NULL); in mt_mtc_update_fixed_counts()
131 mt_fixed_counts(uint64_t *counts) in mt_fixed_counts() argument
147 uint64_t counts[MT_CORE_NFIXED]; in mt_cur_cpu_instrs() local
153 mt_fixed_counts(counts); in mt_cur_cpu_instrs()
154 return counts[MT_CORE_INSTRS]; in mt_cur_cpu_instrs()
160 uint64_t counts[MT_CORE_NFIXED]; in mt_cur_cpu_cycles() local
166 mt_fixed_counts(counts); in mt_cur_cpu_cycles()
167 return counts[MT_CORE_CYCLES]; in mt_cur_cpu_cycles()
[all …]
H A Dmonotonic.h43 void mt_fixed_counts(uint64_t *counts);
/xnu-11215/tests/recount/
H A Dthread_selfcounts_tests.c123 struct thsc_cpi counts[2] = { 0 }; variable
125 err = thread_selfcounts(THSC_CPI, &counts[0], sizeof(counts[0]));
127 err = thread_selfcounts(THSC_CPI, &counts[1], sizeof(counts[1]));
130 _check_cpi(&counts[0], &counts[1], "anywhere");
253 struct thsc_cpi counts[2]; variable
262 int r1 = thread_selfcounts(THSC_CPI, &counts[0], sizeof(counts[0]));
263 int r2 = thread_selfcounts(THSC_CPI, &counts[1], sizeof(counts[1]));
267 dt_stat_add(instrs, counts[1].tcpi_instructions -
268 counts[0].tcpi_instructions);
269 dt_stat_add(cycles, counts[1].tcpi_cycles - counts[0].tcpi_cycles);
H A Drecount_perf_tests.c295 struct thsc_time_cpi *counts = ctx; in thread_selfcounts_usage() local
308 struct thsc_time_cpi *counts = ctx; in thread_selfcounts_measurement() local
312 counts->ttci_system_time_mach) / 1e9; in thread_selfcounts_measurement()
318 return (double)counts->ttci_cycles; in thread_selfcounts_measurement()
475 return (double)counts->instructions; in task_inspect_basic_counts_measurement()
477 return (double)counts->cycles; in task_inspect_basic_counts_measurement()
520 return (double)counts->total_user + counts->total_system; in task_absolutetime_info_measurement()
522 return (double)counts->total_system; in task_absolutetime_info_measurement()
589 .us_context = &counts,
597 struct thsc_time_cpi counts = { 0 }; variable
[all …]
H A Drecount_tests.c435 _threadcounts_to_rusage_info(struct proc_threadcounts_data *counts, in _threadcounts_to_rusage_info() argument
440 struct proc_threadcounts_data *count = &counts[i]; in _threadcounts_to_rusage_info()
585 struct proc_threadcounts *counts = malloc((unsigned int)counts_size); variable
586 T_QUIET; T_ASSERT_NOTNULL(counts, "allocate counts");
591 int size = proc_pidinfo(getpid(), PROC_PIDTHREADCOUNTS, UINT64_MAX, counts,
/xnu-11215/bsd/dev/
H A Dmonotonic.c231 uint64_t counts[dev->mtd_nmonitors][dev->mtd_ncounters]; in mt_ctl_counts() local
232 memset(counts, 0, in mt_ctl_counts()
233 dev->mtd_ncounters * dev->mtd_nmonitors * sizeof(counts[0][0])); in mt_ctl_counts()
234 error = dev->mtd_read(ctl.in.ctr_mask, (uint64_t *)counts); in mt_ctl_counts()
239 error = copyout(&counts, uptr, sizeof(counts)); in mt_ctl_counts()
330 counts[MT_CORE_CYCLES] = usage->ru_metrics[RCT_LVL_KERNEL].rm_cycles; in _convert_usage_to_counts()
332 #pragma unused(usage, counts) in _convert_usage_to_counts()
353 uint64_t counts[2] = { 0 }; variable
425 counts[0] = end[MT_CORE_INSTRS] - start[MT_CORE_INSTRS];
426 counts[1] = end[MT_CORE_CYCLES] - start[MT_CORE_CYCLES];
[all …]
/xnu-11215/tests/cpu_counters/
H A Dkpc_tests.c241 uint64_t *counts) in check_counters() argument
247 uint64_t count = counts[ctr]; in check_counters()
249 if (counts[ctr] == 0) { in check_counters()
318 uint64_t *counts = kpc_counterbuf_alloc(); variable
320 memset(counts, 0, sizeof(*counts) * mch.ncpus * (mch.nfixed + mch.nconfig));
329 KPC_CLASS_CONFIGURABLE_MASK, NULL, counts);
332 check_counters(mch.ncpus, mch.nconfig, tly, counts);
543 uint64_t *counts = kpc_counterbuf_alloc(); variable
544 T_QUIET; T_WITH_ERRNO; T_ASSERT_NOTNULL(counts,
546 memset(counts, 0, sizeof(*counts) * mch.ncpus * (mch.nfixed + mch.nconfig));
[all …]
/xnu-11215/doc/observability/
H A Drecount.md8 It supports attributing counts to a specific level of the CPU topology (per-CPU and per-CPU kind).
56 - `recount thread <thread-ptr> [...]` prints a table of per-CPU kind counts for threads.
58 - `recount task <task-ptr> [...]` prints a table of per-CPU counts for tasks.
62 - `recount coalition <coalition-ptr>` prints a table of per-CPU kind counts for each coalition, not…
65 - `recount processor <processor-ptr-or-cpu-id>` prints a table of counts for a processor.
106 A traditional locking mechanism would prevent the writer from updating the counts while readers are…
H A Dcpu_counters.md15 1. In "counting" mode, their counts are periodically queried and tallied up for a duration of inter…
/xnu-11215/tools/
H A Dformat_vm_parameter_validation.py267 counts = []
277 counts.append(count)
279 counts.reverse()
280 return counts;
/xnu-11215/bsd/net/
H A Dntstat.c5573 bzero(&counts, sizeof(counts)); in nstat_client_send_counts()
5575 counts.hdr.length = sizeof(counts); in nstat_client_send_counts()
5583 counts.counts.nstat_rxbytes == 0 && in nstat_client_send_counts()
5584 counts.counts.nstat_txbytes == 0) { in nstat_client_send_counts()
5588 client->ntc_unit, &counts, sizeof(counts), in nstat_client_send_counts()
5610 bzero(&counts, sizeof(counts)); in nstat_client_append_counts()
5612 counts.hdr.length = sizeof(counts); in nstat_client_append_counts()
5623 counts.counts.nstat_rxbytes == 0 && counts.counts.nstat_txbytes == 0) { in nstat_client_append_counts()
5627 return nstat_accumulate_msg(client, (uint8_t *)&counts, sizeof(counts)); in nstat_client_append_counts()
5850 desc->counts.nstat_rxbytes == 0 && desc->counts.nstat_txbytes == 0) { in nstat_client_send_update()
[all …]
H A Dntstat.h1072 nstat_counts counts; member
1079 nstat_counts counts; \
1208 nstat_sysinfo_counts counts; member
1216 nstat_sysinfo_get_keyvals(struct nstat_msg_sysinfo_counts *__header_indexable counts) in DEFINE_NTSTAT_DATA_ACCESSOR()
1218 return (struct nstat_sysinfo_keyval *)(void *)nstat_get_data(counts); in DEFINE_NTSTAT_DATA_ACCESSOR()
1503 nstat_counts counts; member
/xnu-11215/osfmk/machine/
H A Dmonotonic.h59 void mt_mtc_update_fixed_counts(struct mt_cpu *mtc, uint64_t *counts,
/xnu-11215/doc/building/
H A Dxnu_build_consolidation.md10 core/cluster counts or cache sizes). Similarly, SoC-specific fix-ups are usually conditionally comp…
95 ### Deriving core/cluster counts from device tree
108 * Removing hardcoded core counts (`CPU_COUNT`) and cluster counts (`ARM_CLUSTER_COUNT`) from XNU, a…
124 sharing a single build. Note that these no longer reflect actual counts and sizes, and the real val…
/xnu-11215/bsd/sys/
H A Dmonotonic.h88 uint64_t counts[1]; member
H A Dvnode_internal.h129 int counts[IOCOUNT_TRACE_MAX_IDX]; member
/xnu-11215/osfmk/arm64/
H A Dmonotonic_arm64.c859 uncmon_read_all_counters(unsigned int monid, uint64_t ctr_mask, uint64_t *counts) in uncmon_read_all_counters() argument
870 counts[ctr] = mon->um_counts[ctr]; in uncmon_read_all_counters()
900 uint64_t *counts = counts_out + (UNCORE_NCTRS * monid); in uncore_read() local
901 uncmon_read_all_counters(monid, ctr_mask, counts); in uncore_read()
/xnu-11215/tests/ktrace/
H A Dkdebug_tests.c1809 struct thsc_cpi counts; member
1825 (void)thread_selfcounts(THSC_CPI, &tc_info->counts, sizeof(tc_info->counts)); in get_thread_counters()
1863 T_ASSERT_GE(tp->arg1, tc_infos[i].counts.tcpi_instructions,
1865 T_ASSERT_GE(tp->arg2, tc_infos[i].counts.tcpi_cycles,
H A Dkperf_tests.c689 uint64_t *counts = kpc_counterbuf_alloc(); variable
690 (void)kpc_get_cpu_counters(true,KPC_CLASS_CONFIGURABLE_MASK, NULL, counts);
691 free(counts);
/xnu-11215/osfmk/vm/
H A Dvm_resident.c10146 mach_memory_info_t * counts; in vm_page_diagnose() local
10168 counts = &info[num_info]; in vm_page_diagnose()
10171 counts[xcount].tag = VM_MAX_TAG_VALUE + xcount; \ in vm_page_diagnose()
10175 counts[xcount].flags = VM_KERN_SITE_COUNTER | xflags; in vm_page_diagnose()
10191 counts[xcount].site = (xcount); \ in vm_page_diagnose()
10192 counts[xcount].size = (xsize); \ in vm_page_diagnose()
10196 counts[xcount].flags = VM_KERN_SITE_COUNTER; in vm_page_diagnose()
10208 counts = &info[num_info]; in vm_page_diagnose()
10216 i += vm_page_diagnose_kt_heaps(counts + i); in vm_page_diagnose()
10243 snprintf(counts[i].name, sizeof(counts[i].name), "%s%s[%s]", in vm_page_diagnose()
[all …]
/xnu-11215/libkdd/
H A DREADME.md76 …subsystems. It includes data such as io stats, vm counters, process names/flags and syscall counts.
/xnu-11215/bsd/vfs/
H A Dvfs_bio.c4411 int counts[MAXBSIZE / CLBYTES + 1]; in vfs_bufstats() local
4418 counts[j] = 0; in vfs_bufstats()
4424 counts[bp->b_bufsize / CLBYTES]++; in vfs_bufstats()
4431 if (counts[j] != 0) { in vfs_bufstats()
4432 printf(", %d-%d", j * CLBYTES, counts[j]); in vfs_bufstats()

12