]> Git Repo - linux.git/blobdiff - tools/perf/scripts/python/exported-sql-viewer.py
Merge tag 'gpio-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[linux.git] / tools / perf / scripts / python / exported-sql-viewer.py
index ebc6a2e5eae9136b6149d23b5873d79f4edf58eb..26d7be785288293abf23f33f86776302c56dc0f7 100755 (executable)
@@ -637,7 +637,7 @@ class CallGraphRootItem(CallGraphLevelItemBase):
                self.query_done = True
                if_has_calls = ""
                if IsSelectable(glb.db, "comms", columns = "has_calls"):
-                       if_has_calls = " WHERE has_calls = TRUE"
+                       if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE
                query = QSqlQuery(glb.db)
                QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
                while query.next():
@@ -918,7 +918,7 @@ class CallTreeRootItem(CallGraphLevelItemBase):
                self.query_done = True
                if_has_calls = ""
                if IsSelectable(glb.db, "comms", columns = "has_calls"):
-                       if_has_calls = " WHERE has_calls = TRUE"
+                       if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE
                query = QSqlQuery(glb.db)
                QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
                while query.next():
@@ -1290,7 +1290,7 @@ class SwitchGraphData(GraphData):
                QueryExec(query, "SELECT id, c_time"
                                        " FROM comms"
                                        " WHERE c_thread_id = " + str(thread_id) +
-                                       "   AND exec_flag = TRUE"
+                                       "   AND exec_flag = " + self.collection.glb.dbref.TRUE +
                                        "   AND c_time >= " + str(start_time) +
                                        "   AND c_time <= " + str(end_time) +
                                        " ORDER BY c_time, id")
@@ -5016,6 +5016,12 @@ class DBRef():
        def __init__(self, is_sqlite3, dbname):
                self.is_sqlite3 = is_sqlite3
                self.dbname = dbname
+               self.TRUE = "TRUE"
+               self.FALSE = "FALSE"
+               # SQLite prior to version 3.23 does not support TRUE and FALSE
+               if self.is_sqlite3:
+                       self.TRUE = "1"
+                       self.FALSE = "0"
 
        def Open(self, connection_name):
                dbname = self.dbname
This page took 0.037245 seconds and 4 git commands to generate.