Skip to content

Commit 26c1120

Browse files
ahunter6acmel
authored andcommitted
perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column
If the new 'has_calls' column is present, use it with the call graph and call tree to select only comms that have calls. Committer testing: Just started the exported-sql-view.py and accessed all the reports, no backtraces. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 2668872 commit 26c1120

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎tools/perf/scripts/python/exported-sql-viewer.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,11 @@ def __init__(self, glb, params):
623623
super(CallGraphRootItem, self).__init__(glb, params, 0, None)
624624
self.dbid = 0
625625
self.query_done = True
626+
if_has_calls = ""
627+
if IsSelectable(glb.db, "comms", columns = "has_calls"):
628+
if_has_calls = " WHERE has_calls = TRUE"
626629
query = QSqlQuery(glb.db)
627-
QueryExec(query, "SELECT id, comm FROM comms")
630+
QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
628631
while query.next():
629632
if not query.value(0):
630633
continue
@@ -900,8 +903,11 @@ def __init__(self, glb, params):
900903
super(CallTreeRootItem, self).__init__(glb, params, 0, None)
901904
self.dbid = 0
902905
self.query_done = True
906+
if_has_calls = ""
907+
if IsSelectable(glb.db, "comms", columns = "has_calls"):
908+
if_has_calls = " WHERE has_calls = TRUE"
903909
query = QSqlQuery(glb.db)
904-
QueryExec(query, "SELECT id, comm FROM comms")
910+
QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
905911
while query.next():
906912
if not query.value(0):
907913
continue

0 commit comments

Comments
 (0)