perf scripts python: export-to-postgresql.py: Export switch events
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 10 Jul 2019 08:58:10 +0000 (11:58 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 10 Jul 2019 16:05:12 +0000 (13:05 -0300)
commit56789f3dc127d4f8c07ce2bb48629ba75e8ef16c
tree177bed32c37f15171b90c0bcf1c182d86065ec36
parent37c1f991b1bcdbe268b99b22e265738f4209f4f4
perf scripts python: export-to-postgresql.py: Export switch events

Export switch events to a new table 'context_switches' and create a view
'context_switches_view'. The table and view will show automatically in the
exported-sql-viewer.py script.

If the table ends up empty, then it and the view are dropped.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190710085810.1650-22-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/scripts/python/export-to-postgresql.py