aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-07-08 01:52:32 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-09 09:13:28 -0400
commit1334bb94cd8a21217cb0c186925f9bc9d47adafc (patch)
treeae5a18d3b3c8b1bb48b503ed70df18177a3ffa14 /tools/perf/scripts/python/export-to-sqlite.py
parentd8d051df9f906232715282cc0570c94273b197bc (diff)
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: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Fixes: 5130c6e55531 ("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.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
-rw-r--r--tools/perf/scripts/python/export-to-sqlite.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/export-to-sqlite.py b/tools/perf/scripts/python/export-to-sqlite.py
index 3222a83f4184..021326c46285 100644
--- a/tools/perf/scripts/python/export-to-sqlite.py
+++ b/tools/perf/scripts/python/export-to-sqlite.py
@@ -608,11 +608,11 @@ def trace_end():
608 if is_table_empty("ptwrite"): 608 if is_table_empty("ptwrite"):
609 drop("ptwrite") 609 drop("ptwrite")
610 if is_table_empty("mwait") and is_table_empty("pwre") and is_table_empty("exstop") and is_table_empty("pwrx"): 610 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');
611 drop("mwait") 612 drop("mwait")
612 drop("pwre") 613 drop("pwre")
613 drop("exstop") 614 drop("exstop")
614 drop("pwrx") 615 drop("pwrx")
615 do_query(query, 'DROP VIEW power_events_view');
616 if is_table_empty("cbr"): 616 if is_table_empty("cbr"):
617 drop("cbr") 617 drop("cbr")
618 618