libs/utils/trace: avoid interleaved cpu_frequency events between devlib and cpufreq
libs/utils/trace: avoid interleaved cpu_frequency events between devlib and cpufreq

devlib injects fake cpu_frequency events at the beginning of a trace to get
information about the frequency. However, in some cases those events get mixed
with real cpu_frequency trace events generated by the cpufreq governor. This
leads to getting a dataframe with with wrong events and also makes the cluster
frequency coherency checks fail, whereas they should not.

For this reason, LISA checks whether the fake events for all CPUs happen before
the first event generated by the cpufreq governor and if this is the case they
are inserted as first events in the cpu_frequency dataframe.

Signed-off-by: Michele Di Giorgio <99fd0b6f5a4e02a4022988691284da2a0299b046@arm.com>

bjackman/lisa,ARM-software/lisa,arnoldlu/lisa,joelagnel/lisa,ARM-software/lisa,bjackman/lisa,ARM-software/lisa,joelagnel/lisa,mdigiorgio/lisa,credp/lisa,ARM-software/lisa,credp/lisa,mdigiorgio/lisa,credp/lisa,arnoldlu/lisa,credp/lisa