Skip to content

tp: Support dynamic out-of-tree (OOT) Wattson SoC power models - #7335

Draft
runpinglai-creator wants to merge 3 commits into
mainfrom
dev/runpinglai/oot
Draft

tp: Support dynamic out-of-tree (OOT) Wattson SoC power models#7335
runpinglai-creator wants to merge 3 commits into
mainfrom
dev/runpinglai/oot

Conversation

@runpinglai-creator

Copy link
Copy Markdown
Contributor

This PR introduces end-to-end support for dynamic out-of-tree (OOT) Wattson SoC power models. Trace Processor can now ingest SoC power models directly embedded in trace packets (WattsonSocModel, field 1004 of FrameworksBaseTracePacket) without requiring device models and power curves to be hardcoded in upstream Perfetto stdlib.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Mirror wattson_soc_model.proto and FrameworksBaseTracePacket extension
1004 from Android frameworks/base.

Define storage tables for dynamic Wattson SoC power models (device info,
CPU topology, idle state mapping, and subsystem power curves) via the
table generator DSL, and register them in TraceStorage.
Implement WattsonSocModelModule to decode WattsonSocModel packets
(TracePacket tag 1004) into Wattson custom storage tables.

Decodes structured WattsonCpuTopology (mapping physical cores to cpufreq
policies, applying deep idle offsets, and setting 2D frequency voting)
and subsystem power curves (1D/2D CPU, GPU, L3, TPU) with backward
compatibility fallbacks. Adds comprehensive unit tests.
Route dynamically imported Wattson SoC models from storage tables into
Wattson SQL stdlib pipeline.

Assigns highest priority to custom device models in _wattson_device_map,
and merges custom topology and empirical power curves with in-tree tables
using UNION ALL. All downstream power estimations and UI continuous
tracks function seamlessly for both in-tree and out-of-tree devices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant