diff --git a/src/trace_processor/importers/ftrace/ftrace_parser.cc b/src/trace_processor/importers/ftrace/ftrace_parser.cc index e644f2faec..07dbe31449 100644 --- a/src/trace_processor/importers/ftrace/ftrace_parser.cc +++ b/src/trace_processor/importers/ftrace/ftrace_parser.cc @@ -3807,13 +3807,9 @@ void FtraceParser::ParseDeviceFrequency(int64_t ts, StringId device_name = context_->storage->InternString( (dev_name.substr(position + sizeof(kDelimiter) - 1) + "freq").c_str()); - TrackTracker::DimensionsBuilder dims_builder = - context_->track_tracker->CreateDimensionsBuilder(); - dims_builder.AppendDimension(device_name_id_, Variadic::String(device_name)); - TrackTracker::Dimensions dims_id = std::move(dims_builder).Build(); - - TrackId track_id = context_->track_tracker->InternCounterTrack( - tracks::linux_device_frequency, dims_id); + TrackId track_id = context_->track_tracker->InternSingleDimensionTrack( + tracks::linux_device_frequency, device_name_id_, + Variadic::String(device_name)); context_->event_tracker->PushCounter(ts, static_cast(event.freq()), track_id); } diff --git a/src/trace_processor/perfetto_sql/stdlib/linux/devfreq.sql b/src/trace_processor/perfetto_sql/stdlib/linux/devfreq.sql index 7b20cb22a3..7fa09bcb72 100644 --- a/src/trace_processor/perfetto_sql/stdlib/linux/devfreq.sql +++ b/src/trace_processor/perfetto_sql/stdlib/linux/devfreq.sql @@ -39,11 +39,10 @@ SELECT FROM counter_leading_intervals!(( SELECT c.* FROM counter c - JOIN counter_track ct ON ct.id = c.track_id - WHERE ct.classification = 'linux_device_frequency' - AND EXTRACT_ARG(ct.dimension_arg_set_id, 'device_name') = $device_name -)) AS count_w_dur -JOIN counter_track AS ct ON track_id = ct.id; + JOIN track t ON t.id = c.track_id + WHERE t.classification = 'linux_device_frequency' + AND EXTRACT_ARG(t.dimension_arg_set_id, 'device_name') = $device_name +)) AS count_w_dur; -- ARM DSU device frequency counters. This table will only be populated on -- traces collected with "devfreq/devfreq_frequency" ftrace event enabled, diff --git a/ui/src/plugins/dev.perfetto.AsyncSlices/index.ts b/ui/src/plugins/dev.perfetto.AsyncSlices/index.ts index b27991c6a5..464443bc41 100644 --- a/ui/src/plugins/dev.perfetto.AsyncSlices/index.ts +++ b/ui/src/plugins/dev.perfetto.AsyncSlices/index.ts @@ -115,6 +115,7 @@ class AsyncSlicePlugin implements PerfettoPlugin { and (name != '${suspendResumeLatencyTrackName}' or name is null) and classification not in ( 'linux_rpm', + 'linux_device_frequency', 'irq_counter', 'softirq_counter', 'android_energy_estimation_breakdown',