Lines Matching defs:sample
92 * struct sample - Store performance sample
94 * performance during last sample period
99 * read from APERF MSR between last and current sample
101 * read from MPERF MSR between last and current sample
103 * current sample
106 * This structure is used in the cpudata structure to store performance sample
109 struct sample {
205 * current sample
206 * @sample: Storage for storing last Sample data
245 struct sample sample;
2135 cpu->last_update = cpu->sample.time;
2144 expired = time_after64(cpu->sample.time, cpu->last_update +
2151 cpu->last_update = cpu->sample.time;
2157 cpu->sample.time = time;
2196 struct sample *sample = &cpu->sample;
2198 sample->core_avg_perf = div_ext_fp(sample->aperf, sample->mperf);
2217 cpu->last_sample_time = cpu->sample.time;
2218 cpu->sample.time = time;
2219 cpu->sample.aperf = aperf;
2220 cpu->sample.mperf = mperf;
2221 cpu->sample.tsc = tsc;
2222 cpu->sample.aperf -= cpu->prev_aperf;
2223 cpu->sample.mperf -= cpu->prev_mperf;
2224 cpu->sample.tsc -= cpu->prev_tsc;
2231 * previous sample data fields are equal to zero or stale and they must
2233 * that sample.time will always be reset before setting the utilization
2234 * update hook and make the caller skip the sample then.
2245 return mul_ext_fp(cpu->sample.core_avg_perf, cpu_khz);
2251 cpu->sample.core_avg_perf);
2256 struct sample *sample = &cpu->sample;
2260 busy_frac = div_fp(sample->mperf << cpu->aperf_mperf_shift,
2261 sample->tsc);
2266 sample->busy_scaled = busy_frac * 100;
2309 struct sample *sample;
2319 sample = &cpu->sample;
2320 trace_pstate_sample(mul_ext_fp(100, sample->core_avg_perf),
2321 fp_toint(sample->busy_scaled),
2324 sample->mperf,
2325 sample->aperf,
2326 sample->tsc,
2361 delta_ns = time - cpu->sample.time;
2509 cpu->sample.time = 0;
2840 struct sample *sample;
2848 sample = &cpu->sample;
2853 sample->mperf,
2854 sample->aperf,
2855 sample->tsc,