cpufreq: amd-pstate: Add more tracepoint for AMD P-State module
authorJinzhou Su <Jinzhou.Su@amd.com>
Wed, 9 Mar 2022 01:23:48 +0000 (09:23 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2022 18:53:01 +0000 (19:53 +0100)
commit23c296fb7eeea99dec035521c07ae54c28b8a267
tree697118ba2f781d14a78fbe6799e8da2d210c9208
parenta1b6f487cb47ad99ee14730f03c80d3eb4c71e8a
cpufreq: amd-pstate: Add more tracepoint for AMD P-State module

Add frequency, mperf, aperf and tsc in the trace. This can be used
to debug and tune the performance of AMD P-state driver.

Use the time difference between amd_pstate_update to calculate CPU
frequency. There could be sleep in arch_freq_get_on_cpu, so do not
use it here.

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
Co-developed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/amd-pstate-trace.h
drivers/cpufreq/amd-pstate.c