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/exported-sql-viewer.py (1 of 1 file). Show all
Unified · Split
| @@ -623,8 +623,11 @@ class CallGraphRootItem(CallGraphLevelItemBase): · 622 unmodified lines | ||
| 623 | 623 | super(CallGraphRootItem, self).__init__(glb, params, 0, None) |
| 624 | 624 | self.dbid = 0 |
| 625 | 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 | 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 | 631 | while query.next(): |
| 629 | 632 | if not query.value(0): |
| 630 | 633 | continue |
| @@ -900,8 +903,11 @@ class CallTreeRootItem(CallGraphLevelItemBase): · 269 unmodified lines | ||
| 900 | 903 | super(CallTreeRootItem, self).__init__(glb, params, 0, None) |
| 901 | 904 | self.dbid = 0 |
| 902 | 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 | 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 | 911 | while query.next(): |
| 906 | 912 | if not query.value(0): |
| 907 | 913 | continue |