History

perf scripts python: export-to-sqlite.py: Export comm details

Add table columns for thread id, comm start time and exec flag.

Adrian Hunter committed 7 years ago

Commit 41085f21 parent 8ebf5cc1 file · +7 −4Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/export-to-sqlite.py+7−4
@@ -177,7 +177,10 @@ do_query(query, 'CREATE TABLE threads (' · 176 unmodified lines
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 (?, ?, ?)") · 352 unmodified lines
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(): · 33 unmodified lines
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): · 59 unmodified lines
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)