| /freebsd-12-stable/sys/i386/i386/ |
| D | perfmon.c | 129 perfmon_setup(int pmc, unsigned int control) in perfmon_setup() argument 133 if (pmc < 0 || pmc >= NPMC) in perfmon_setup() 136 perfmon_inuse |= (1 << pmc); in perfmon_setup() 139 ctl_shadow[pmc] = control; in perfmon_setup() 140 writectl(pmc); in perfmon_setup() 141 wrmsr(msr_pmc[pmc], pmc_shadow[pmc] = 0); in perfmon_setup() 147 perfmon_get(int pmc, unsigned int *control) in perfmon_get() argument 149 if (pmc < 0 || pmc >= NPMC) in perfmon_get() 152 if (perfmon_inuse & (1 << pmc)) { in perfmon_get() 153 *control = ctl_shadow[pmc]; in perfmon_get() [all …]
|
| D | prof_machdep.c | 268 struct pmc pmc; in sysctl_machdep_cputime_clock() local 274 pmc.pmc_val = cputime_clock_pmc_conf; in sysctl_machdep_cputime_clock() 275 clock += pmc.pmc_event; in sysctl_machdep_cputime_clock() 285 pmc.pmc_num = 0; in sysctl_machdep_cputime_clock() 286 pmc.pmc_event = event; in sysctl_machdep_cputime_clock() 287 pmc.pmc_unit = 0; in sysctl_machdep_cputime_clock() 288 pmc.pmc_flags = PMCF_E | PMCF_OS | PMCF_USR; in sysctl_machdep_cputime_clock() 289 pmc.pmc_mask = 0; in sysctl_machdep_cputime_clock() 290 cputime_clock_pmc_conf = pmc.pmc_val; in sysctl_machdep_cputime_clock()
|
| /freebsd-12-stable/lib/libpmc/ |
| D | Makefile | 3 LIB_CXX= pmc 6 INCS= pmc.h pmclog.h pmcformat.h 44 MAN= pmc.3 59 MAN+= pmc.soft.3 62 MAN+= pmc.atom.3 63 MAN+= pmc.atomsilvermont.3 64 MAN+= pmc.core.3 65 MAN+= pmc.core2.3 66 MAN+= pmc.corei7.3 67 MAN+= pmc.corei7uc.3 [all …]
|
| /freebsd-12-stable/sys/gnu/dts/arm/ |
| D | sam9x60.dtsi | 76 clocks = <&pmc PMC_TYPE_PERIPHERAL 22>, <&pmc PMC_TYPE_PERIPHERAL 22>, <&pmc PMC_TYPE_SYSTEM 6>; 85 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 22>; 87 assigned-clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>; 105 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 122 clocks = <&pmc PMC_TYPE_PERIPHERAL 12>, <&pmc PMC_TYPE_GCK 12>; 124 assigned-clocks = <&pmc PMC_TYPE_GCK 12>; 133 clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_GCK 26>; 135 assigned-clocks = <&pmc PMC_TYPE_GCK 26>; 149 clocks = <&pmc PMC_TYPE_PERIPHERAL 13>; 159 clocks = <&pmc PMC_TYPE_PERIPHERAL 14>; [all …]
|
| D | sama5d2.dtsi | 51 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 67 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 122 clocks = <&pmc PMC_TYPE_PERIPHERAL 42>, <&pmc PMC_TYPE_CORE PMC_UTMI>; 249 clocks = <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_PERIPHERAL 41>, <&pmc PMC_TYPE_SYSTEM 6>; 258 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 41>; 282 clocks = <&pmc PMC_TYPE_CORE PMC_MCK2>; 301 clocks = <&pmc PMC_TYPE_PERIPHERAL 31>, <&pmc PMC_TYPE_GCK 31>, <&pmc PMC_TYPE_CORE PMC_MAIN>; 303 assigned-clocks = <&pmc PMC_TYPE_GCK 31>; 312 clocks = <&pmc PMC_TYPE_PERIPHERAL 32>, <&pmc PMC_TYPE_GCK 32>, <&pmc PMC_TYPE_CORE PMC_MAIN>; 314 assigned-clocks = <&pmc PMC_TYPE_GCK 32>; [all …]
|
| D | at91sam9260.dtsi | 113 pmc: pmc@fffffc00 { label 114 compatible = "atmel,at91sam9260-pmc", "syscon"; 125 clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>; 131 clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>; 138 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 149 …clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&pmc PMC_TYPE_PERIPHERAL 18>, <&pmc PMC_TYPE_PERIPHERAL 1… 161 …clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, <&pmc PMC_TYPE_PERIPHERAL 27>, <&pmc PMC_TYPE_PERIPHERAL 2… 502 clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; 513 clocks = <&pmc PMC_TYPE_PERIPHERAL 3>; 524 clocks = <&pmc PMC_TYPE_PERIPHERAL 4>; [all …]
|
| D | at91sam9261.dtsi | 79 clocks = <&pmc PMC_TYPE_PERIPHERAL 20>, <&pmc PMC_TYPE_SYSTEM 16>, <&pmc PMC_TYPE_SYSTEM 6>; 90 clocks = <&pmc PMC_TYPE_PERIPHERAL 21>, <&pmc PMC_TYPE_SYSTEM 17>; 110 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 136 …clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&pmc PMC_TYPE_PERIPHERAL 18>, <&pmc PMC_TYPE_PERIPHERAL 1… 144 clocks = <&pmc PMC_TYPE_PERIPHERAL 10>, <&pmc PMC_TYPE_SYSTEM 7>; 158 clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; 171 clocks = <&pmc PMC_TYPE_PERIPHERAL 11>; 183 clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; 196 clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; 209 clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; [all …]
|
| D | at91sam9263.dtsi | 96 pmc: pmc@fffffc00 { label 97 compatible = "atmel,at91sam9263-pmc", "syscon"; 134 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 143 clocks = <&pmc PMC_TYPE_PERIPHERAL 19>, <&slow_xtal>; 485 clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; 496 clocks = <&pmc PMC_TYPE_PERIPHERAL 3>; 507 clocks = <&pmc PMC_TYPE_PERIPHERAL 4>; 518 clocks = <&pmc PMC_TYPE_PERIPHERAL 4>; 529 clocks = <&pmc PMC_TYPE_PERIPHERAL 4>; 539 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; [all …]
|
| D | sama5d4.dtsi | 105 clocks = <&pmc PMC_TYPE_PERIPHERAL 47>, <&pmc PMC_TYPE_CORE PMC_UTMI>; 232 clocks = <&pmc PMC_TYPE_PERIPHERAL 46>, <&pmc PMC_TYPE_PERIPHERAL 46>, <&pmc PMC_TYPE_SYSTEM 6>; 241 clocks = <&pmc PMC_TYPE_CORE PMC_UTMI>, <&pmc PMC_TYPE_PERIPHERAL 46>; 265 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 295 clocks = <&pmc PMC_TYPE_PERIPHERAL 51>, <&pmc PMC_TYPE_SYSTEM 3>, <&clk32k>; 324 clocks = <&pmc PMC_TYPE_PERIPHERAL 50>; 334 clocks = <&pmc PMC_TYPE_PERIPHERAL 52>; 346 clocks = <&pmc PMC_TYPE_SYSTEM 2>, <&pmc PMC_TYPE_PERIPHERAL 16>; 355 clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; 359 pmc: pmc@f0018000 { label [all …]
|
| D | at91sam9x5.dtsi | 115 clocks = <&pmc PMC_TYPE_SYSTEM 2>; 124 pmc: pmc@fffffc00 { label 125 compatible = "atmel,at91sam9x5-pmc", "syscon"; 149 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 165 clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&clk32k>; 175 clocks = <&pmc PMC_TYPE_PERIPHERAL 17>, <&clk32k>; 184 clocks = <&pmc PMC_TYPE_PERIPHERAL 20>; 193 clocks = <&pmc PMC_TYPE_PERIPHERAL 21>; 591 clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; 603 clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; [all …]
|
| D | at91sam9rl.dtsi | 92 clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_PERIPHERAL 23>; 110 clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; 136 …clocks = <&pmc PMC_TYPE_PERIPHERAL 16>, <&pmc PMC_TYPE_PERIPHERAL 17>, <&pmc PMC_TYPE_PERIPHERAL 1… 147 clocks = <&pmc PMC_TYPE_PERIPHERAL 10>; 158 clocks = <&pmc PMC_TYPE_PERIPHERAL 11>; 179 clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; 192 clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; 205 clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; 218 clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; 246 clocks = <&pmc PMC_TYPE_PERIPHERAL 19>; [all …]
|
| /freebsd-12-stable/share/examples/perfmon/ |
| D | perfmon.c | 56 struct pmc pmc; in main() local 62 pmc.pmc_num = 0; in main() 63 pmc.pmc_event = 0; in main() 64 pmc.pmc_unit = 0; in main() 65 pmc.pmc_flags = 0; in main() 66 pmc.pmc_mask = 0; in main() 74 pmc.pmc_flags |= PMCF_USR; in main() 77 pmc.pmc_flags |= PMCF_OS; in main() 80 pmc.pmc_flags |= PMCF_E; in main() 83 pmc.pmc_flags |= PMCF_INV; in main() [all …]
|
| /freebsd-12-stable/sys/dev/hwpmc/ |
| D | hwpmc_arm64.c | 61 arm64_interrupt_enable(uint32_t pmc) in arm64_interrupt_enable() argument 65 reg = (1 << pmc); in arm64_interrupt_enable() 75 arm64_interrupt_disable(uint32_t pmc) in arm64_interrupt_disable() argument 79 reg = (1 << pmc); in arm64_interrupt_disable() 89 arm64_counter_enable(unsigned int pmc) in arm64_counter_enable() argument 93 reg = (1 << pmc); in arm64_counter_enable() 103 arm64_counter_disable(unsigned int pmc) in arm64_counter_disable() argument 107 reg = (1 << pmc); in arm64_counter_disable() 139 arm64_pmcn_read(unsigned int pmc) in arm64_pmcn_read() argument 142 KASSERT(pmc < arm64_npmcs, ("%s: illegal PMC number %d", __func__, pmc)); in arm64_pmcn_read() [all …]
|
| D | hwpmc_armv7.c | 64 armv7_interrupt_enable(uint32_t pmc) in armv7_interrupt_enable() argument 68 reg = (1 << pmc); in armv7_interrupt_enable() 76 armv7_interrupt_disable(uint32_t pmc) in armv7_interrupt_disable() argument 80 reg = (1 << pmc); in armv7_interrupt_disable() 88 armv7_counter_enable(unsigned int pmc) in armv7_counter_enable() argument 92 reg = (1 << pmc); in armv7_counter_enable() 100 armv7_counter_disable(unsigned int pmc) in armv7_counter_disable() argument 104 reg = (1 << pmc); in armv7_counter_disable() 112 armv7_pmcn_read(unsigned int pmc) in armv7_pmcn_read() argument 115 KASSERT(pmc < armv7_npmcs, ("%s: illegal PMC number %d", __func__, pmc)); in armv7_pmcn_read() [all …]
|
| D | hwpmc_mod.c | 207 static int pmc_add_sample(ring_type_t ring, struct pmc *pm, struct trapframe *tf); 210 static int pmc_attach_process(struct proc *p, struct pmc *pm); 211 static struct pmc *pmc_allocate_pmc_descriptor(void); 213 static int pmc_attach_one_process(struct proc *p, struct pmc *pm); 216 static int pmc_can_attach(struct pmc *pm, struct proc *p); 219 static int pmc_detach_process(struct proc *p, struct pmc *pm); 220 static int pmc_detach_one_process(struct proc *p, struct pmc *pm, 223 static void pmc_destroy_pmc_descriptor(struct pmc *pm); 226 static int pmc_find_pmc(pmc_id_t pmcid, struct pmc **pm); 227 static struct pmc *pmc_find_pmc_descriptor_in_process(struct pmc_owner *po, [all …]
|
| D | hwpmc_mips24k.c | 167 mips_pmcn_read(unsigned int pmc) in mips_pmcn_read() argument 171 KASSERT(pmc < mips_npmcs, ("[mips24k,%d] illegal PMC number %d", in mips_pmcn_read() 172 __LINE__, pmc)); in mips_pmcn_read() 175 switch (pmc) { in mips_pmcn_read() 189 mips_pmcn_write(unsigned int pmc, uint64_t reg) in mips_pmcn_write() argument 192 KASSERT(pmc < mips_npmcs, ("[mips24k,%d] illegal PMC number %d", in mips_pmcn_write() 193 __LINE__, pmc)); in mips_pmcn_write() 195 switch (pmc) { in mips_pmcn_write()
|
| D | hwpmc_octeon.c | 121 mips_pmcn_read(unsigned int pmc) in mips_pmcn_read() argument 125 KASSERT(pmc < mips_npmcs, ("[mips,%d] illegal PMC number %d", in mips_pmcn_read() 126 __LINE__, pmc)); in mips_pmcn_read() 129 switch (pmc) { in mips_pmcn_read() 143 mips_pmcn_write(unsigned int pmc, uint64_t reg) in mips_pmcn_write() argument 146 KASSERT(pmc < mips_npmcs, ("[mips,%d] illegal PMC number %d", in mips_pmcn_write() 147 __LINE__, pmc)); in mips_pmcn_write() 149 switch (pmc) { in mips_pmcn_write()
|
| D | hwpmc_ppc970.c | 273 ppc970_pmcn_read(unsigned int pmc) in ppc970_pmcn_read() argument 277 switch (pmc) { in ppc970_pmcn_read() 303 panic("Invalid PMC number: %d\n", pmc); in ppc970_pmcn_read() 310 ppc970_pmcn_write(unsigned int pmc, uint32_t val) in ppc970_pmcn_write() argument 312 switch (pmc) { in ppc970_pmcn_write() 338 panic("Invalid PMC number: %d\n", pmc); in ppc970_pmcn_write() 343 ppc970_config_pmc(int cpu, int ri, struct pmc *pm) in ppc970_config_pmc() 368 struct pmc *pm; in ppc970_set_pmc() 402 struct pmc *pm; in ppc970_start_pmc() 436 struct pmc *pm; in ppc970_read_pmc() [all …]
|
| D | hwpmc_soft.c | 98 soft_allocate_pmc(int cpu, int ri, struct pmc *pm, in soft_allocate_pmc() 137 soft_config_pmc(int cpu, int ri, struct pmc *pm) in soft_config_pmc() 160 soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in soft_describe() 193 soft_get_config(int cpu, int ri, struct pmc **ppm) in soft_get_config() 267 struct pmc *pm; in soft_read_pmc() 291 struct pmc *pm; in soft_write_pmc() 313 soft_release_pmc(int cpu, int ri, struct pmc *pmc) in soft_release_pmc() argument 319 (void) pmc; in soft_release_pmc() 331 ev = pmc->pm_event; in soft_release_pmc() 347 struct pmc *pm; in soft_start_pmc() [all …]
|
| D | hwpmc_mips74k.c | 197 mips_pmcn_read(unsigned int pmc) in mips_pmcn_read() argument 201 KASSERT(pmc < mips_npmcs, ("[mips74k,%d] illegal PMC number %d", in mips_pmcn_read() 202 __LINE__, pmc)); in mips_pmcn_read() 205 switch (pmc) { in mips_pmcn_read() 219 mips_pmcn_write(unsigned int pmc, uint64_t reg) in mips_pmcn_write() argument 222 KASSERT(pmc < mips_npmcs, ("[mips74k,%d] illegal PMC number %d", in mips_pmcn_write() 223 __LINE__, pmc)); in mips_pmcn_write() 225 switch (pmc) { in mips_pmcn_write()
|
| D | hwpmc_uncore.c | 189 ucf_allocate_pmc(int cpu, int ri, struct pmc *pm, in ucf_allocate_pmc() 221 ucf_config_pmc(int cpu, int ri, struct pmc *pm) in ucf_config_pmc() 240 ucf_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in ucf_describe() 267 ucf_get_config(int cpu, int ri, struct pmc **ppm) in ucf_get_config() 277 struct pmc *pm; in ucf_read_pmc() 304 ucf_release_pmc(int cpu, int ri, struct pmc *pmc) in ucf_release_pmc() argument 306 PMCDBG3(MDP,REL,1, "ucf-release cpu=%d ri=%d pm=%p", cpu, ri, pmc); in ucf_release_pmc() 322 struct pmc *pm; in ucf_start_pmc() 391 struct pmc *pm; in ucf_write_pmc() 523 ucp_allocate_pmc(int cpu, int ri, struct pmc *pm, in ucp_allocate_pmc() [all …]
|
| D | hwpmc_e500.c | 246 e500_pmcn_read(unsigned int pmc) in e500_pmcn_read() argument 248 switch (pmc) { in e500_pmcn_read() 262 panic("Invalid PMC number: %d\n", pmc); in e500_pmcn_read() 267 e500_pmcn_write(unsigned int pmc, uint32_t val) in e500_pmcn_write() argument 269 switch (pmc) { in e500_pmcn_write() 283 panic("Invalid PMC number: %d\n", pmc); in e500_pmcn_write() 290 struct pmc *pm; in e500_read_pmc() 316 struct pmc *pm; in e500_write_pmc() 336 e500_config_pmc(int cpu, int ri, struct pmc *pm) in e500_config_pmc() 362 struct pmc *pm; in e500_start_pmc() [all …]
|
| /freebsd-12-stable/sys/arm/nvidia/tegra124/ |
| D | tegra124_mp.c | 80 bus_space_handle_t pmc; in tegra124_mp_start_ap() local 86 if (bus_space_map(fdtbus_bs_tag, PMC_PHYSBASE, PMC_SIZE, 0, &pmc) != 0) in tegra124_mp_start_ap() 99 val = bus_space_read_4(fdtbus_bs_tag, pmc, in tegra124_mp_start_ap() 104 val = bus_space_read_4(fdtbus_bs_tag, pmc, PMC_PWRGATE_STATUS); in tegra124_mp_start_ap() 109 val = bus_space_read_4(fdtbus_bs_tag, pmc, in tegra124_mp_start_ap() 112 bus_space_write_4(fdtbus_bs_tag, pmc, in tegra124_mp_start_ap() 118 val = bus_space_read_4(fdtbus_bs_tag, pmc, in tegra124_mp_start_ap() 126 bus_space_unmap(fdtbus_bs_tag, pmc, PMC_SIZE); in tegra124_mp_start_ap()
|
| D | tegra124_machdep.c | 97 bus_space_handle_t pmc; in tegra124_cpu_reset() local 101 bus_space_map(fdtbus_bs_tag, PMC_PHYSBASE, PMC_SIZE, 0, &pmc); in tegra124_cpu_reset() 103 reg = bus_space_read_4(fdtbus_bs_tag, pmc, PMC_SCRATCH0); in tegra124_cpu_reset() 105 bus_space_write_4(fdtbus_bs_tag, pmc, PMC_SCRATCH0, in tegra124_cpu_reset() 107 bus_space_read_4(fdtbus_bs_tag, pmc, PMC_SCRATCH0); in tegra124_cpu_reset() 109 reg = bus_space_read_4(fdtbus_bs_tag, pmc, PMC_CONTROL_REG); in tegra124_cpu_reset() 112 bus_space_write_4(fdtbus_bs_tag, pmc, PMC_CONTROL_REG, reg | 0x10); in tegra124_cpu_reset() 113 bus_space_read_4(fdtbus_bs_tag, pmc, PMC_CONTROL_REG); in tegra124_cpu_reset()
|
| /freebsd-12-stable/usr.sbin/pmccontrol/ |
| D | pmccontrol.c | 134 int cpu, pmc; in pmcc_do_enable_disable() local 159 pmc = np->op_pmc; in pmcc_do_enable_disable() 165 if (pmc >= npmc) in pmcc_do_enable_disable() 166 errx(EX_DATAERR, "PMC id too large: \"%d\"", pmc); in pmcc_do_enable_disable() 184 SET_PMCS(i, pmc, op); in pmcc_do_enable_disable() 187 SET_PMCS(cpu, pmc, op); in pmcc_do_enable_disable() 357 int error, command, currentcpu, option, pmc; in main() local 412 pmc = PMCC_PMC_ALL; in main() 414 pmc = strtoul(optarg, &dummy, 0); in main() 415 if (*dummy != '\0' || pmc < 0) in main() [all …]
|