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.
Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all
Unified · Split
| @@ -623,8 +623,11 @@ class CallGraphRootItem(CallGraphLevelItemBase): · 622 unmodified lines | |||
| 623 | super(CallGraphRootItem, self).__init__(glb, params, 0, None) | 623 | super(CallGraphRootItem, self).__init__(glb, params, 0, None) |
| 624 | self.dbid = 0 | 624 | self.dbid = 0 |
| 625 | self.query_done = True | 625 | 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" | ||
| 626 | query = QSqlQuery(glb.db) | 629 | query = QSqlQuery(glb.db) |
| 627 | QueryExec(query, "SELECT id, comm FROM comms") | 630 | QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls) |
| 628 | while query.next(): | 631 | while query.next(): |
| 629 | if not query.value(0): | 632 | if not query.value(0): |
| 630 | continue | 633 | continue |
| @@ -900,8 +903,11 @@ class CallTreeRootItem(CallGraphLevelItemBase): · 269 unmodified lines | |||
| 900 | super(CallTreeRootItem, self).__init__(glb, params, 0, None) | 903 | super(CallTreeRootItem, self).__init__(glb, params, 0, None) |
| 901 | self.dbid = 0 | 904 | self.dbid = 0 |
| 902 | self.query_done = True | 905 | 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" | ||
| 903 | query = QSqlQuery(glb.db) | 909 | query = QSqlQuery(glb.db) |
| 904 | QueryExec(query, "SELECT id, comm FROM comms") | 910 | QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls) |
| 905 | while query.next(): | 911 | while query.next(): |
| 906 | if not query.value(0): | 912 | if not query.value(0): |
| 907 | continue | 913 | continue |