diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2019-07-10 04:57:58 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-10 11:13:26 -0400 |
commit | 41085f2bdd5882632e7dd88d1e5b59b7eac2a2a9 (patch) | |
tree | b38e5566156ae2e50c8bac98acbf873986e560c5 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 8ebf5cc0f6ce469d65ba2e8ce519dae34f0b3f50 (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.py | 11 |
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)') |
178 | do_query(query, 'CREATE TABLE comms (' | 178 | do_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)') | ||
181 | do_query(query, 'CREATE TABLE comm_threads (' | 184 | do_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 (?, ?, ?)") | |||
536 | thread_query = QSqlQuery(db) | 539 | thread_query = QSqlQuery(db) |
537 | thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)") | 540 | thread_query.prepare("INSERT INTO threads VALUES (?, ?, ?, ?, ?)") |
538 | comm_query = QSqlQuery(db) | 541 | comm_query = QSqlQuery(db) |
539 | comm_query.prepare("INSERT INTO comms VALUES (?, ?)") | 542 | comm_query.prepare("INSERT INTO comms VALUES (?, ?, ?, ?, ?)") |
540 | comm_thread_query = QSqlQuery(db) | 543 | comm_thread_query = QSqlQuery(db) |
541 | comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)") | 544 | comm_thread_query.prepare("INSERT INTO comm_threads VALUES (?, ?, ?)") |
542 | dso_query = QSqlQuery(db) | 545 | dso_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 | ||
644 | def comm_table(*x): | 647 | def comm_table(*x): |
645 | bind_exec(comm_query, 2, x) | 648 | bind_exec(comm_query, 5, x) |
646 | 649 | ||
647 | def comm_thread_table(*x): | 650 | def comm_thread_table(*x): |
648 | bind_exec(comm_thread_query, 3, x) | 651 | bind_exec(comm_thread_query, 3, x) |