MCPcopy Create free account
hub / github.com/F-Stack/f-stack / perfmon_stop

Function perfmon_stop

freebsd/i386/i386/perfmon.c:193–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193int
194perfmon_stop(int pmc)
195{
196 register_t saveintr;
197
198 if (pmc < 0 || pmc >= NPMC)
199 return EINVAL;
200
201 if (perfmon_inuse & (1 << pmc)) {
202 saveintr = intr_disable();
203 pmc_shadow[pmc] = rdmsr(msr_pmc[pmc]) & 0xffffffffffULL;
204 ctl_shadow[pmc] &= ~(PMCF_EN << 16);
205 writectl(pmc);
206 intr_restore(saveintr);
207 return 0;
208 }
209 return EBUSY;
210}
211
212int
213perfmon_read(int pmc, quad_t *val)

Callers 2

perfmon_finiFunction · 0.85
perfmon_ioctlFunction · 0.85

Calls 3

intr_disableFunction · 0.50
rdmsrFunction · 0.50
intr_restoreFunction · 0.50

Tested by

no test coverage detected