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
177177 'tid integer)')
178178 do_query(query, 'CREATE TABLE comms ('
179179 '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)')
181184 do_query(query, 'CREATE TABLE comm_threads ('
182185 'id integer NOT NULL PRIMARY KEY,'
183186 'comm_id bigint,'
@@ -536,7 +539,7 @@ machine_query.prepare("INSERT INTO machines VALUES (?, ?, ?)") · 352 unmodified lines
536539 thread_query = QSqlQuery(db)
537540 thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)")
538541 comm_query = QSqlQuery(db)
539−comm_query.prepare("INSERT INTO comms VALUES (?, ?)")
542+comm_query.prepare("INSERT INTO comms VALUES (?, ?, ?, ?, ?)")
540543 comm_thread_query = QSqlQuery(db)
541544 comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)")
542545 dso_query = QSqlQuery(db)
@@ -576,7 +579,7 @@ def trace_begin(): · 33 unmodified lines
576579 evsel_table(0, "unknown")
577580 machine_table(0, 0, "unknown")
578581 thread_table(0, 0, 0, -1, -1)
579− comm_table(0, "unknown")
582+ comm_table(0, "unknown", 0, 0, 0)
580583 dso_table(0, 0, "unknown", "unknown", "")
581584 symbol_table(0, 0, 0, 0, 0, "unknown")
582585 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
642645 bind_exec(thread_query, 5, x)
643646
644647 def comm_table(*x):
645− bind_exec(comm_query, 2, x)
648+ bind_exec(comm_query, 5, x)
646649
647650 def comm_thread_table(*x):
648651 bind_exec(comm_thread_query, 3, x)