Commit 41085f2b authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190710085810.1650-10-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8ebf5cc0
...@@ -177,7 +177,10 @@ do_query(query, 'CREATE TABLE threads (' ...@@ -177,7 +177,10 @@ do_query(query, 'CREATE TABLE threads ('
'tid integer)') 'tid integer)')
do_query(query, 'CREATE TABLE comms (' do_query(query, 'CREATE TABLE comms ('
'id integer NOT NULL PRIMARY KEY,' 'id integer NOT NULL PRIMARY KEY,'
'comm varchar(16))') 'comm varchar(16),'
'c_thread_id bigint,'
'c_time bigint,'
'exec_flag boolean)')
do_query(query, 'CREATE TABLE comm_threads (' do_query(query, 'CREATE TABLE comm_threads ('
'id integer NOT NULL PRIMARY KEY,' 'id integer NOT NULL PRIMARY KEY,'
'comm_id bigint,' 'comm_id bigint,'
...@@ -536,7 +539,7 @@ machine_query.prepare("INSERT INTO machines VALUES (?, ?, ?)") ...@@ -536,7 +539,7 @@ machine_query.prepare("INSERT INTO machines VALUES (?, ?, ?)")
thread_query = QSqlQuery(db) thread_query = QSqlQuery(db)
thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)") thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)")
comm_query = QSqlQuery(db) comm_query = QSqlQuery(db)
comm_query.prepare("INSERT INTO comms VALUES (?, ?)") comm_query.prepare("INSERT INTO comms VALUES (?, ?, ?, ?, ?)")
comm_thread_query = QSqlQuery(db) comm_thread_query = QSqlQuery(db)
comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)") comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)")
dso_query = QSqlQuery(db) dso_query = QSqlQuery(db)
...@@ -576,7 +579,7 @@ def trace_begin(): ...@@ -576,7 +579,7 @@ def trace_begin():
evsel_table(0, "unknown") evsel_table(0, "unknown")
machine_table(0, 0, "unknown") machine_table(0, 0, "unknown")
thread_table(0, 0, 0, -1, -1) thread_table(0, 0, 0, -1, -1)
comm_table(0, "unknown") comm_table(0, "unknown", 0, 0, 0)
dso_table(0, 0, "unknown", "unknown", "") dso_table(0, 0, "unknown", "unknown", "")
symbol_table(0, 0, 0, 0, 0, "unknown") symbol_table(0, 0, 0, 0, 0, "unknown")
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) 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,7 +645,7 @@ def thread_table(*x):
bind_exec(thread_query, 5, x) bind_exec(thread_query, 5, x)
def comm_table(*x): def comm_table(*x):
bind_exec(comm_query, 2, x) bind_exec(comm_query, 5, x)
def comm_thread_table(*x): def comm_thread_table(*x):
bind_exec(comm_thread_query, 3, x) bind_exec(comm_thread_query, 3, x)
......
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