History

perf scripts python: export-to-sqlite.py: Fix DROP VIEW power_events_view

Drop power_events_view before its dependent tables. SQLite does not seem to mind but the fix was needed for PostgreSQL (export-to-postgresql.py script), so do the same fix for the SQLite. It is more logical and keeps the 2 scripts following the same approach.

Adrian Hunter committed 7 years ago

Commit 1334bb91 parent d8d051d1 file · +1 −1Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/export-to-sqlite.py+1−1
@@ -608,11 +608,11 @@ def trace_end(): · 607 unmodified lines
608608 if is_table_empty("ptwrite"):
609609 drop("ptwrite")
610610 if is_table_empty("mwait") and is_table_empty("pwre") and is_table_empty("exstop") and is_table_empty("pwrx"):
611+ do_query(query, 'DROP VIEW power_events_view');
611612 drop("mwait")
612613 drop("pwre")
613614 drop("exstop")
614615 drop("pwrx")
615− do_query(query, 'DROP VIEW power_events_view');
616616 if is_table_empty("cbr"):
617617 drop("cbr")
618618