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

Function startguprof

freebsd/amd64/amd64/prof_machdep.c:275–295  ·  view source on GitHub ↗
(gp)

Source from the content-addressed store, hash-verified

273 */
274
275void
276startguprof(gp)
277 struct gmonparam *gp;
278{
279 uint64_t freq;
280
281 freq = atomic_load_acq_64(&tsc_freq);
282 if (cputime_clock == CPUTIME_CLOCK_UNINITIALIZED) {
283 if (freq != 0 && mp_ncpus == 1)
284 cputime_clock = CPUTIME_CLOCK_TSC;
285 else
286 cputime_clock = CPUTIME_CLOCK_I8254;
287 }
288 if (cputime_clock == CPUTIME_CLOCK_TSC) {
289 gp->profrate = freq >> 1;
290 cputime_prof_active = 1;
291 } else
292 gp->profrate = i8254_freq << CPUTIME_CLOCK_I8254_SHIFT;
293 cputime_bias = 0;
294 cputime();
295}
296
297void
298stopguprof(gp)

Callers

nothing calls this directly

Calls 2

cputimeFunction · 0.70
atomic_load_acq_64Function · 0.50

Tested by

no test coverage detected