| /xnu-12377.1.9/osfmk/x86_64/ |
| H A D | kpc_x86.c | 76 wrIA32_FIXED_CTRx(uint32_t ctr, uint64_t value) in wrIA32_FIXED_CTRx() argument 78 return wrmsr64(MSR_IA32_PERF_FIXED_CTR0 + ctr, value); in wrIA32_FIXED_CTRx() 83 IA32_PMCx(uint32_t ctr) in IA32_PMCx() argument 86 return rdpmc64(ctr); in IA32_PMCx() 88 return rdmsr64(MSR_IA32_PERFCTR0 + ctr); in IA32_PMCx() 93 wrIA32_PMCx(uint32_t ctr, uint64_t value) in wrIA32_PMCx() argument 95 return wrmsr64(MSR_IA32_PERFCTR0 + ctr, value); in wrIA32_PMCx() 99 IA32_PERFEVTSELx(uint32_t ctr) in IA32_PERFEVTSELx() argument 101 return rdmsr64(MSR_IA32_EVNTSEL0 + ctr); in IA32_PERFEVTSELx() 105 wrIA32_PERFEVTSELx(uint32_t ctr, uint64_t value) in wrIA32_PERFEVTSELx() argument [all …]
|
| H A D | monotonic_x86_64.c | 82 mt_core_snap(unsigned int ctr) in mt_core_snap() argument 84 if (!mt_core_supported || ctr >= kpc_fixed_count()) { in mt_core_snap() 88 switch (ctr) { in mt_core_snap() 98 panic("monotonic: invalid core counter read: %u", ctr); in mt_core_snap() 104 mt_core_set_snap(unsigned int ctr, uint64_t count) in mt_core_set_snap() argument 106 if (!mt_core_supported || ctr >= kpc_fixed_count()) { in mt_core_set_snap() 110 switch (ctr) { in mt_core_set_snap() 124 panic("monotonic: invalid core counter write: %u", ctr); in mt_core_set_snap()
|
| /xnu-12377.1.9/osfmk/arm64/ |
| H A D | monotonic_arm64.c | 205 mt_core_snap(unsigned int ctr) in mt_core_snap() argument 207 switch (ctr) { in mt_core_snap() 231 panic("monotonic: invalid core counter read: %u", ctr); in mt_core_snap() 237 mt_core_set_snap(unsigned int ctr, uint64_t count) in mt_core_set_snap() argument 239 switch (ctr) { in mt_core_set_snap() 247 panic("monotonic: invalid core counter %u write %llu", ctr, count); in mt_core_set_snap() 575 uncmon_read_counter_locked_l(__unused unsigned int monid, unsigned int ctr) in uncmon_read_counter_locked_l() argument 577 assert(ctr < UNCORE_NCTRS); in uncmon_read_counter_locked_l() 578 switch (ctr) { in uncmon_read_counter_locked_l() 614 panic("monotonic: invalid counter read %u", ctr); in uncmon_read_counter_locked_l() [all …]
|
| H A D | kpc.c | 56 void kpc_pmi_handler(unsigned int ctr); 695 uint64_t ctr = 0ULL; in kpc_get_configurable_counters() local 703 ctr = read_counter(i + offset); in kpc_get_configurable_counters() 705 if (ctr & KPC_ARM64_COUNTER_OVF_MASK) { in kpc_get_configurable_counters() 706 ctr = CONFIGURABLE_SHADOW(i) + in kpc_get_configurable_counters() 708 (ctr & KPC_ARM64_COUNTER_MASK); in kpc_get_configurable_counters() 710 ctr = CONFIGURABLE_SHADOW(i) + in kpc_get_configurable_counters() 711 (ctr - CONFIGURABLE_RELOAD(i)); in kpc_get_configurable_counters() 714 *counterv++ = ctr; in kpc_get_configurable_counters() 754 kpc_reload_counter(uint32_t ctr) in kpc_reload_counter() argument [all …]
|
| /xnu-12377.1.9/osfmk/kern/ |
| H A D | kpc.h | 61 #define FIXED_ACTIONID(ctr) (kpc_actionid[(ctr)]) argument 62 #define CONFIGURABLE_ACTIONID(ctr) (kpc_actionid[(ctr) + kpc_fixed_count()]) argument 65 #define FIXED_RELOAD(ctr) (current_cpu_datap()->cpu_kpc_reload[(ctr)]) argument 66 #define FIXED_RELOAD_CPU(cpu, ctr) (cpu_datap(cpu)->cpu_kpc_reload[(ctr)]) argument 67 #define CONFIGURABLE_RELOAD(ctr) (current_cpu_datap()->cpu_kpc_reload[(ctr) + kpc_fi… argument 68 #define CONFIGURABLE_RELOAD_CPU(cpu, ctr) (cpu_datap(cpu)->cpu_kpc_reload[(ctr) + kpc_fixed_c… argument 71 #define FIXED_SHADOW(ctr) (current_cpu_datap()->cpu_kpc_shadow[(ctr)]) argument 72 #define FIXED_SHADOW_CPU(cpu, ctr) (cpu_datap(cpu)->cpu_kpc_shadow[(ctr)]) argument 73 #define CONFIGURABLE_SHADOW(ctr) (current_cpu_datap()->cpu_kpc_shadow[(ctr) + kpc_fi… argument 74 #define CONFIGURABLE_SHADOW_CPU(cpu, ctr) (cpu_datap(cpu)->cpu_kpc_shadow[(ctr) + kpc_fixed_c… argument [all …]
|
| H A D | kern_monotonic.c | 49 mt_mtc_update_count(struct mt_cpu *mtc, unsigned int ctr) in mt_mtc_update_count() argument 51 uint64_t snap = mt_core_snap(ctr); in mt_mtc_update_count() 52 if (snap < mtc->mtc_snaps[ctr]) { in mt_mtc_update_count() 56 cpu_number(), thread_tid(current_thread()), ctr, snap, in mt_mtc_update_count() 57 mtc->mtc_snaps[ctr]); in mt_mtc_update_count() 61 mtc->mtc_snaps[ctr] = snap; in mt_mtc_update_count() 65 uint64_t count = snap - mtc->mtc_snaps[ctr]; in mt_mtc_update_count() 66 mtc->mtc_snaps[ctr] = snap; in mt_mtc_update_count() 72 mt_cpu_update_count(cpu_data_t *cpu, unsigned int ctr) in mt_cpu_update_count() argument 74 return mt_mtc_update_count(&cpu->cpu_monotonic, ctr); in mt_cpu_update_count() [all …]
|
| H A D | monotonic.h | 111 uint64_t mt_cpu_update_count(cpu_data_t *cpu, unsigned int ctr); 122 int mt_microstackshot_start(unsigned int ctr, uint64_t period, mt_pmi_fn fn,
|
| H A D | kpc_common.c | 246 kpc_controls_counter(uint32_t ctr) in kpc_controls_counter() argument 250 assert(ctr < (kpc_fixed_count() + kpc_configurable_count())); in kpc_controls_counter() 252 if (ctr < kpc_fixed_count()) { in kpc_controls_counter() 262 pmc_mask = (1ULL << (ctr - kpc_fixed_count())); in kpc_controls_counter()
|
| H A D | telemetry.c | 323 unsigned int ctr = 0; in telemetry_pmi_setup() local 348 ctr = MT_CORE_INSTRS; in telemetry_pmi_setup() 354 ctr = MT_CORE_CYCLES; in telemetry_pmi_setup() 366 error = mt_microstackshot_start(ctr, period, telemetry_pmi_handler, NULL); in telemetry_pmi_setup()
|
| /xnu-12377.1.9/osfmk/machine/ |
| H A D | monotonic.h | 61 uint64_t mt_mtc_update_count(struct mt_cpu *mtc, unsigned int ctr); 62 uint64_t mt_core_snap(unsigned int ctr); 63 void mt_core_set_snap(unsigned int ctr, uint64_t snap); 64 void mt_mtc_set_snap(struct mt_cpu *mtc, unsigned int ctr, uint64_t snap);
|
| /xnu-12377.1.9/tests/ |
| H A D | monotonic_uncore.c | 142 uint32_t ctr; in uncore_add() local 161 ctr = add_ctl.out.ctr; in uncore_add() 162 T_QUIET; T_ASSERT_LT(ctr, (uint32_t)CTRS_MAX, "counter returned should be sane"); in uncore_add() 163 return ctr; in uncore_add() 171 uint32_t ctr; variable 175 ctr = uncore_add(fd, REF_TIMEBASE_EVENT, UINT64_MAX, 0); 176 T_LOG("added event to uncore counter %d\n", ctr); 178 (void)uncore_add(fd, REF_TIMEBASE_EVENT, UINT64_C(1) << ctr, ENOSPC);
|
| /xnu-12377.1.9/tests/cpu_counters/ |
| H A D | kpc_tests.c | 245 unsigned int ctr = i * nctrs + j; in check_counters() local 246 struct tally *tly = &tallies[ctr]; in check_counters() 247 uint64_t count = counts[ctr]; in check_counters() 249 if (counts[ctr] == 0) { in check_counters() 277 unsigned int ctr = i * nctrs + j; in check_tally() local 278 struct tally *tly = &tallies[ctr]; in check_tally() 634 unsigned int ctr = i * (mch.nfixed + mch.nconfig) + mch.nfixed; 635 uint64_t delta = tly[ctr].lastvalue - tly[ctr].firstvalue;
|
| /xnu-12377.1.9/EXTERNAL_HEADERS/corecrypto/ |
| H A D | ccmode_impl.h | 111 …int (*CC_SPTR(ccmode_ctr, setctr))(const struct ccmode_ctr *mode, ccctr_ctx *ctx, const void *ctr); 112 int (*CC_SPTR(ccmode_ctr, ctr))(ccctr_ctx *ctx, size_t nbytes, const void *in, void *out); 257 const struct ccmode_ctr *ctr; member 283 const struct ccmode_ctr *ctr; member
|
| H A D | ccrng_fortuna.h | 121 uint8_t ctr[16]; member
|
| H A D | ccmode_factory.h | 69 void ccmode_factory_ctr_crypt(struct ccmode_ctr *ctr,
|
| /xnu-12377.1.9/bsd/dev/ |
| H A D | monotonic.c | 188 uint32_t ctr; in mt_ctl_add() local 198 error = dev->mtd_add(&ctl.in.config, &ctr); in mt_ctl_add() 203 ctl.out.ctr = ctr; in mt_ctl_add()
|
| /xnu-12377.1.9/osfmk/corecrypto/ |
| H A D | ccmode_internal.h | 245 int ccmode_ctr_init(const struct ccmode_ctr *ctr, ccctr_ctx *ctx, 247 int ccmode_ctr_setctr(const struct ccmode_ctr *mode, ccctr_ctx *ctx, const void *ctr); 258 .ctr = ccmode_ctr_crypt, \ 284 ccctr_setctr(const struct ccmode_ctr *mode, ccctr_ctx *ctx, const void *ctr) in ccctr_setctr() argument 286 return mode->setctr(mode, ctx, ctr); in ccctr_setctr()
|
| /xnu-12377.1.9/bsd/sys/ |
| H A D | monotonic.h | 71 uint32_t ctr; member
|
| /xnu-12377.1.9/bsd/security/audit/ |
| H A D | audit_bsm.c | 616 int ctr; in kaudit_to_bsm() local 1826 for (ctr = 0; ctr < (int)ar->ar_arg_len; ctr++) { in kaudit_to_bsm() 1828 ar->ar_arg_ctlname[ctr]); in kaudit_to_bsm()
|
| H A D | audit_bsm_token.c | 1180 int ctr; in au_to_exec_strings() local 1187 ctr = count; in au_to_exec_strings() 1189 while (ctr-- > 0) { in au_to_exec_strings()
|