stdlib: Add support for DSU dependent devices
Add support for devices that depend on DSU for power estimates. The
callflow will short circuit device-specific tables that are unnecessary
for that device's calculation. For example, a device that depends on DSU
calculations will short circuit tables that use CPU dependent
calculations.
Runtime of existing Wattson test cases remain the same before and after
this patch (~4300ms).
SQL modules callflow:
┌────────┐ ┌────────┐
│cpu_idle│ │cpu_freq│
└┬───────┘ └───────┬┘
│ │
│ ┌─────────────┐ │ ┌───────┐
└─►│cpu_freq_idle│◄─┘ │devfreq│
└──────┬──────┘ └───┬───┘
│ │
┌────▼────┐ │
┌──┤cpu_split├──────────┐ │
│ └─────────┘ │ │
│ │ │
┌───▼────────────┐ ┌────────▼───▼───┐
│w_cpu_dependence│ │w_dsu_dependence│
└───┬────────────┘ └────────┬───────┘
│ │
│ ┌─────────┐ │
└─────►│estimates│◄─────┘
└─────────┘
Bug: 370829192
Test: tools/diff_test_trace_processor.py out/linux/trace_processor_shell --name-filter '.*wattson.*'
Change-Id: I8eb611450605837ed88aea5f5d2934c572e11730
Signed-off-by: Samuel Wu <wusamuel@google.com>
diff --git a/Android.bp b/Android.bp
index f4bc565..e6cb2a6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13662,6 +13662,7 @@
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/idle_attribution.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/utils.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/w_cpu_dependence.sql",
+ "src/trace_processor/perfetto_sql/stdlib/wattson/curves/w_dsu_dependence.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/device_infos.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/system_state.sql",
],