On 09/10/2014 03:08 PM, Pi-Cheng Chen wrote:
On 10 September 2014 17:15, Daniel Lezcano <daniel.lezc...@linaro.org> wrote:
On 09/10/2014 09:33 AM, pi-cheng.chen wrote:
When using intel_pstate driver, "scaling_available_freqs" attr is not
exported to sysfs. It causes assertion of idlestat due to memory of
struct cpufreq_pstate was not allocated.
Allocate struct cpufreq_pstate dynamically when getting frequency
information from trace file instead of parsing available frequencies
from sysfs
Changes v1 to v2:
Sort the cpufreq_pstate list when parsing events
Signed-off-by: Pi-Cheng Chen <pi-cheng.c...@linaro.org>
Tested on intel_pstate and legacy cpufreq driver.
In complement of this feature, I think the cpus cpufreq must be initialized
with the 'cpuinfo_cur_freq' with the start time initialized to the beginning
of the acquisition. If a cpu is in a specific freq without any changes
(understand: ftrace transitions which trigger the p-state creation), we will
have a long freq residency (the initial one).
Today we don't have this, so the cpus without freq changes are not
displayed.
At least the minimal number of p-state should be '1' not '0' (except if
cpufreq is disabled).
-- Daniel
How about to create some "fake records" manually in the trace file?
Get p-states of all CPUs first before starting tracing and write them
as fake records of p-state transitions before storing the traces from
sysfs to trace file. So that the report will be consistent with that
generated by import mode.
Well I think initializing directly the p-state structure with one
element at init time will be simpler and cleaner. For the C-state it is
not possible because we don't know idle state the cpu is, so we have to
force a wakeup on all cpus but for the p-state this info is available in
the sysfs.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev