History

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.

Adrian Hunter committed 7 years ago

Commit 26c11201 parent 26688721 file · +8 −2Browse files

Showing the changes to tools/perf/scripts/python/exported-sql-viewer.py (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/exported-sql-viewer.py+8−2
@@ -623,8 +623,11 @@ class CallGraphRootItem(CallGraphLevelItemBase): · 622 unmodified lines
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 @@ class CallTreeRootItem(CallGraphLevelItemBase): · 269 unmodified lines
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