diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2019-07-10 04:58:05 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-10 11:31:25 -0400 |
commit | 26c11206f433ea507a7541f48cb472b85870577e (patch) | |
tree | ed70c6058e8bc66f166d675d18dd536519137078 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 266887291cac7f4020b5c83d2af9a13aece44a74 (diff) |
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>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-rwxr-xr-x | tools/perf/scripts/python/exported-sql-viewer.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py index dbbd7a5d9b60..61b3911d91e6 100755 --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py | |||
@@ -623,8 +623,11 @@ class CallGraphRootItem(CallGraphLevelItemBase): | |||
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): | |||
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 |