TraceProcessor: Add clipping support to sched table + minor fixes
- Fix mac build by not building libunwind stack on mac
- Fix cost estimation of the sched_slices table, which was always
return an estimated cost of 0.
- Fix heuristics for sorting.
- Introduce ts_clip=true|false column in sched table. When set to
true, it truncates the start and duration of slices around the
ts >< operators. For instance:
Given shced slices: [ A ][ B ][ C ]
And WHERE ts BETWEEN x and y ^x y^
The output would be: [ A ][ B ][ C ]
Change-Id: I0c9a244f8b539e1b1e509cc7709cc5a98451a40b
diff --git a/src/trace_processor/trace_storage.h b/src/trace_processor/trace_storage.h
index f5a9dbc..925f307 100644
--- a/src/trace_processor/trace_storage.h
+++ b/src/trace_processor/trace_storage.h
@@ -217,7 +217,11 @@
uint32_t cpu,
uint32_t new_freq) {
auto& freqs = cpu_freq_[cpu];
- PERFETTO_DCHECK(freqs.empty() || timestamp > freqs.back().first);
+ if (!freqs.empty() && timestamp < freqs.back().first) {
+ PERFETTO_ELOG("cpufreq out of order by %.4f ms, skipping",
+ (freqs.back().first - timestamp) / 1e6);
+ return;
+ }
freqs.emplace_back(timestamp, new_freq);
}