Commit 1334bb94 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

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.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: 5130c6e5 ("perf scripts python: export-to-sqlite.py: Export Intel PT power and ptwrite events")
Link: http://lkml.kernel.org/r/20190708055232.5032-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d8d051df
...@@ -608,11 +608,11 @@ def trace_end(): ...@@ -608,11 +608,11 @@ def trace_end():
if is_table_empty("ptwrite"): if is_table_empty("ptwrite"):
drop("ptwrite") drop("ptwrite")
if is_table_empty("mwait") and is_table_empty("pwre") and is_table_empty("exstop") and is_table_empty("pwrx"): if is_table_empty("mwait") and is_table_empty("pwre") and is_table_empty("exstop") and is_table_empty("pwrx"):
do_query(query, 'DROP VIEW power_events_view');
drop("mwait") drop("mwait")
drop("pwre") drop("pwre")
drop("exstop") drop("exstop")
drop("pwrx") drop("pwrx")
do_query(query, 'DROP VIEW power_events_view');
if is_table_empty("cbr"): if is_table_empty("cbr"):
drop("cbr") drop("cbr")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment