I use perf_event_open syscall to capture the PMU data,in my code,I print the number of PERF_COUNT_HW_CPU_CYCLES per second. But it's irregular, (i use cpufreq to set the frequence of CPU, and guess the number of PERF_COUNT_HW_CPU_CYCLES will be a constant, but this is not the truth)
(left line is cpu_cycles, right line is cpu_clock) idle: idle
stress -c 4: stress_cpu
what will change the number of PERF_COUNT_HW_CPU_CYCLES ?