(gp)
| 273 | */ |
| 274 | |
| 275 | void |
| 276 | startguprof(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 | |
| 297 | void |
| 298 | stopguprof(gp) |
nothing calls this directly
no test coverage detected