aboutsummaryrefslogtreecommitdiff
path: root/src/trace_processor/importers/ftrace/sched_event_tracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/trace_processor/importers/ftrace/sched_event_tracker.h')
-rw-r--r--src/trace_processor/importers/ftrace/sched_event_tracker.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/trace_processor/importers/ftrace/sched_event_tracker.h b/src/trace_processor/importers/ftrace/sched_event_tracker.h
index a4e8602ea..eff442cc5 100644
--- a/src/trace_processor/importers/ftrace/sched_event_tracker.h
+++ b/src/trace_processor/importers/ftrace/sched_event_tracker.h
@@ -110,8 +110,16 @@ class SchedEventTracker : public Destructible {
void ClosePendingSlice(uint32_t slice_idx, int64_t ts, int64_t prev_state);
- // Infromation retained from the preceding sched_switch seen on a given cpu.
- std::array<PendingSchedInfo, kMaxCpus> pending_sched_per_cpu_{};
+ // Information retained from the preceding sched_switch seen on a given cpu.
+ std::vector<PendingSchedInfo> pending_sched_per_cpu_;
+
+ // Get the sched info for the given CPU, resizing the vector if necessary.
+ PendingSchedInfo* PendingSchedByCPU(uint32_t cpu) {
+ if (PERFETTO_UNLIKELY(cpu >= pending_sched_per_cpu_.size())) {
+ pending_sched_per_cpu_.resize(cpu + 1);
+ }
+ return &pending_sched_per_cpu_[cpu];
+ }
static constexpr uint8_t kSchedSwitchMaxFieldId = 7;
std::array<StringId, kSchedSwitchMaxFieldId + 1> sched_switch_field_ids_;
@@ -121,6 +129,8 @@ class SchedEventTracker : public Destructible {
std::array<StringId, kSchedWakingMaxFieldId + 1> sched_waking_field_ids_;
StringId sched_waking_id_;
+ StringId waker_utid_id_;
+
TraceProcessorContext* const context_;
};