Skip to content

Commit

Permalink
stdlib: Remove redundant Wattson module
Browse files Browse the repository at this point in the history
This is an old Wattson module that was made redundant by new metrics
added. All the functionality in this module is now encapsulated in
Wattson metrics. Additionally, the tables that are removed were too
rigid and didn't have the flexibility that is needed for external teams
to use.

This cleanup is an intermediate step to give the Wattosn modules a more
intuitive and understandable name.

Bug: 370829192
Test: tools/diff_test_trace_processor.py out/linux/trace_processor_shell --name-filter '.*wattson.*'
Change-Id: I467c1ff5cbc3a6a36be25a8ca1feafd03ab95f0e
Signed-off-by: Samuel Wu <[email protected]>
  • Loading branch information
Samuel Wu committed Oct 14, 2024
1 parent e134a54 commit a753766
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 124 deletions.
1 change: 0 additions & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -13667,7 +13667,6 @@ genrule {
"src/trace_processor/perfetto_sql/stdlib/wattson/cpu_idle.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/cpu_split.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/device.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/grouped.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/idle_attribution.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/ungrouped.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/utils.sql",
Expand Down
1 change: 0 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3078,7 +3078,6 @@ perfetto_filegroup(
"src/trace_processor/perfetto_sql/stdlib/wattson/cpu_idle.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/cpu_split.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/device.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/grouped.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/idle_attribution.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/ungrouped.sql",
"src/trace_processor/perfetto_sql/stdlib/wattson/curves/utils.sql",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.

INCLUDE PERFETTO MODULE wattson.curves.grouped;
INCLUDE PERFETTO MODULE wattson.curves.ungrouped;
INCLUDE PERFETTO MODULE viz.summary.threads_w_processes;

DROP VIEW IF EXISTS _wattson_period_windows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.

INCLUDE PERFETTO MODULE wattson.curves.grouped;
INCLUDE PERFETTO MODULE wattson.curves.ungrouped;
INCLUDE PERFETTO MODULE viz.summary.threads_w_processes;

-- Take only the Wattson estimations that are in the window of interest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.

INCLUDE PERFETTO MODULE wattson.curves.grouped;
INCLUDE PERFETTO MODULE wattson.curves.ungrouped;
INCLUDE PERFETTO MODULE viz.summary.threads_w_processes;

DROP VIEW IF EXISTS _wattson_period_windows;
Expand Down
1 change: 0 additions & 1 deletion src/trace_processor/perfetto_sql/stdlib/wattson/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ perfetto_sql_source_set("wattson") {
"cpu_idle.sql",
"cpu_split.sql",
"curves/device.sql",
"curves/grouped.sql",
"curves/idle_attribution.sql",
"curves/ungrouped.sql",
"curves/utils.sql",
Expand Down
66 changes: 0 additions & 66 deletions src/trace_processor/perfetto_sql/stdlib/wattson/curves/grouped.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-- limitations under the License.

INCLUDE PERFETTO MODULE intervals.intersect;
INCLUDE PERFETTO MODULE wattson.curves.grouped;
INCLUDE PERFETTO MODULE wattson.curves.ungrouped;

-- Get slice info of threads/processes
CREATE PERFETTO TABLE _thread_process_slices AS
Expand Down
51 changes: 0 additions & 51 deletions test/trace_processor/diff_tests/stdlib/wattson/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,57 +304,6 @@ def test_wattson_suspend_calculations(self):
24792795173845,50781,39.690000,39.690000,0.000000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]"
"""))

# Tests that device curve table is being looked up correctly
def test_wattson_device_curve_per_policy(self):
return DiffTestBlueprint(
trace=DataPath('wattson_dsu_pmu.pb'),
query=("""
INCLUDE PERFETTO MODULE wattson.curves.grouped;
select * from wattson_estimate_per_component
WHERE ts > 359661672577
ORDER by ts ASC
LIMIT 10
"""),
out=Csv("""
"ts","dur","l3","little_cpus","mid_cpus","big_cpus"
359661672578,75521,18051.005200,49.300000,550.550000,2064.320000
359661748099,2254517,840849.917600,49.440000,47.000000,2064.320000
359664003674,11596,2770.713600,1031.260000,1054.100000,3885.780000
359664015270,4720,1127.359000,1031.260000,1054.100000,2064.320000
359664019990,18921,4522.446400,1031.260000,550.550000,2064.320000
359664038911,8871,2120.319000,785.770000,550.550000,2064.320000
359664047782,1343,320.839600,540.280000,550.550000,2064.320000
359664049491,1383,514.276100,254.130000,47.000000,2064.320000
359664050874,2409912,898807.333300,49.440000,47.000000,2064.320000
359666460786,13754,3286.709200,49.300000,550.550000,2064.320000
"""))

# Tests that total calculations are correct
def test_wattson_total_raven_calc(self):
return DiffTestBlueprint(
trace=DataPath('wattson_dsu_pmu.pb'),
query=("""
INCLUDE PERFETTO MODULE wattson.curves.grouped;
select * from _wattson_entire_trace
"""),
out=Csv("""
"total_l3","total_little_cpus","total_mid_cpus","total_big_cpus","total"
500.010000,662.000000,370.730000,1490.770000,3023.520000
"""))

# Tests that total calculations are correct
def test_wattson_total_eos_calc(self):
return DiffTestBlueprint(
trace=DataPath('wattson_eos_suspend.pb'),
query=("""
INCLUDE PERFETTO MODULE wattson.curves.grouped;
select * from _wattson_entire_trace
"""),
out=Csv("""
"total_l3","total_little_cpus","total_mid_cpus","total_big_cpus","total"
0.000000,2602.930000,0.000000,0.000000,2602.930000
"""))

# Tests that total calculations are correct
def test_wattson_idle_attribution(self):
return DiffTestBlueprint(
Expand Down

0 comments on commit a753766

Please sign in to comment.