metrics: Force modified_rail_slices to be empty if not valid
The modified_rail_slices view uses data from the VSync event to divide
RAIL_MODE_ANIMATION slices into foreground_idle and animation. Since
this event is only emitted on Android, the modified_rail_slices will
have no animation and only foreground_idle on other platforms which may
given a misleading pictures.
To that end, this adds chrome/chrome_trace_metadata.sql which extracts
trace metadata currently restricted to trace categories and OS, which
are then used to force the modified_rail_slices view to be empty if its
value would not be valid.
Bug: 173094735
Change-Id: I7d630c15de56fd656e86f6d744a49a30357e8f03
diff --git a/BUILD b/BUILD
index 3c723f5..0b6c279 100644
--- a/BUILD
+++ b/BUILD
@@ -824,6 +824,7 @@
"src/trace_processor/metrics/android/unsymbolized_frames.sql",
"src/trace_processor/metrics/chrome/actual_power_by_category.sql",
"src/trace_processor/metrics/chrome/actual_power_by_rail_mode.sql",
+ "src/trace_processor/metrics/chrome/chrome_event_metadata.sql",
"src/trace_processor/metrics/chrome/chrome_processes.sql",
"src/trace_processor/metrics/chrome/chrome_thread_slice_with_cpu_time.sql",
"src/trace_processor/metrics/chrome/cpu_time_by_category.sql",