aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-07-10 04:57:58 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-10 11:13:26 -0400
commit41085f2bdd5882632e7dd88d1e5b59b7eac2a2a9 (patch)
treeb38e5566156ae2e50c8bac98acbf873986e560c5 /tools/perf/scripts/python/export-to-sqlite.py
parent8ebf5cc0f6ce469d65ba2e8ce519dae34f0b3f50 (diff)
perf scripts python: export-to-sqlite.py: Export comm details
Add table columns for thread id, comm start time and exec flag. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-10-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.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/perf/scripts/python/export-to-sqlite.py b/tools/perf/scripts/python/export-to-sqlite.py
index 021326c46285..97aa66dd2fe1 100644
--- a/tools/perf/scripts/python/export-to-sqlite.py
+++ b/tools/perf/scripts/python/export-to-sqlite.py
@@ -177,7 +177,10 @@ do_query(query, 'CREATE TABLE threads ('
177 'tid integer)') 177 'tid integer)')
178do_query(query, 'CREATE TABLE comms (' 178do_query(query, 'CREATE TABLE comms ('
179 'id integer NOT NULL PRIMARY KEY,' 179 'id integer NOT NULL PRIMARY KEY,'
180 'comm varchar(16))') 180 'comm varchar(16),'
181 'c_thread_id bigint,'
182 'c_time bigint,'
183 'exec_flag boolean)')
181do_query(query, 'CREATE TABLE comm_threads (' 184do_query(query, 'CREATE TABLE comm_threads ('
182 'id integer NOT NULL PRIMARY KEY,' 185 'id integer NOT NULL PRIMARY KEY,'
183 'comm_id bigint,' 186 'comm_id bigint,'
@@ -536,7 +539,7 @@ machine_query.prepare("INSERT INTO machines VALUES (?, ?, ?)")
536thread_query = QSqlQuery(db) 539thread_query = QSqlQuery(db)
537thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)") 540thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)")
538comm_query = QSqlQuery(db) 541comm_query = QSqlQuery(db)
539comm_query.prepare("INSERT INTO comms VALUES (?, ?)") 542comm_query.prepare("INSERT INTO comms VALUES (?, ?, ?, ?, ?)")
540comm_thread_query = QSqlQuery(db) 543comm_thread_query = QSqlQuery(db)
541comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)") 544comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)")
542dso_query = QSqlQuery(db) 545dso_query = QSqlQuery(db)
@@ -576,7 +579,7 @@ def trace_begin():
576 evsel_table(0, "unknown") 579 evsel_table(0, "unknown")
577 machine_table(0, 0, "unknown") 580 machine_table(0, 0, "unknown")
578 thread_table(0, 0, 0, -1, -1) 581 thread_table(0, 0, 0, -1, -1)
579 comm_table(0, "unknown") 582 comm_table(0, "unknown", 0, 0, 0)
580 dso_table(0, 0, "unknown", "unknown", "") 583 dso_table(0, 0, "unknown", "unknown", "")
581 symbol_table(0, 0, 0, 0, 0, "unknown") 584 symbol_table(0, 0, 0, 0, 0, "unknown")
582 sample_table(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 585 sample_table(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
@@ -642,7 +645,7 @@ def thread_table(*x):
642 bind_exec(thread_query, 5, x) 645 bind_exec(thread_query, 5, x)
643 646
644def comm_table(*x): 647def comm_table(*x):
645 bind_exec(comm_query, 2, x) 648 bind_exec(comm_query, 5, x)
646 649
647def comm_thread_table(*x): 650def comm_thread_table(*x):
648 bind_exec(comm_thread_query, 3, x) 651 bind_exec(comm_thread_query, 3, x)