Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/prof_machdep.c
Show All 12 Lines | |||||
if (error == 0 && req->newptr != NULL) { | if (error == 0 && req->newptr != NULL) { | ||||
if (clock < 0 || clock > CPUTIME_CLOCK_TSC) | if (clock < 0 || clock > CPUTIME_CLOCK_TSC) | ||||
return (EINVAL); | return (EINVAL); | ||||
cputime_clock = clock; | cputime_clock = clock; | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, CTLTYPE_INT | CTLFLAG_RW, | SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, | ||||
0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", ""); | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", | |||||
""); | |||||
/* | /* | ||||
* The start and stop routines need not be here since we turn off profiling | * The start and stop routines need not be here since we turn off profiling | ||||
* before calling them. They are here for convenience. | * before calling them. They are here for convenience. | ||||
*/ | */ | ||||
void | void | ||||
startguprof(gp) | startguprof(gp) | ||||
Show All 12 Lines |