Lines Matching full:query
183 def QueryExec(query, stmt): argument
184 ret = query.exec_(stmt)
186 raise Exception("Query failed: " + query.lastError().text())
540 query = QSqlQuery(self.glb.db)
545 …QueryExec(query, "SELECT call_path_id, name, short_name, COUNT(calls.id), SUM(return_time - call_t…
555 while query.next():
557 insn_cnt = int(query.value(5))
558 cyc_cnt = int(query.value(6))
559 branch_count = int(query.value(7))
563 branch_count = int(query.value(5))
564 …ld_count, self.comm_id, self.thread_id, query.value(0), query.value(1), query.value(2), query.valu…
627 query = QSqlQuery(self.glb.db)
628 QueryExec(query, "SELECT thread_id, pid, tid"
632 while query.next():
633 …oItem(self.glb, self.params, self.child_count, self.dbid, query.value(0), query.value(1), query.va…
648 query = QSqlQuery(glb.db)
649 QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
650 while query.next():
651 if not query.value(0):
653 …child_item = CallGraphLevelOneItem(glb, params, self.child_count, query.value(0), query.value(1), …
671 def FindSelect(self, value, pattern, query): argument
692 self.DoFindSelect(query, match)
694 def Found(self, query, found): argument
696 return self.FindPath(query)
699 def FindValue(self, value, pattern, query, last_value, last_pattern): argument
701 found = query.first()
703 self.FindSelect(value, pattern, query)
704 found = query.next()
705 return self.Found(query, found)
707 def FindNext(self, query): argument
708 found = query.next()
710 found = query.first()
711 return self.Found(query, found)
713 def FindPrev(self, query): argument
714 found = query.previous()
716 found = query.last()
717 return self.Found(query, found)
721 ids = self.FindValue(c.value, c.pattern, c.query, c.last_value, c.last_pattern)
723 ids = self.FindNext(c.query)
725 ids = self.FindPrev(c.query)
731 self.value, self.direction, self.pattern, self.query, self.last_value, self.last_pattern = x
776 def DoFindSelect(self, query, match): argument
777 QueryExec(query, "SELECT call_path_id, comm_id, thread_id"
786 def FindPath(self, query): argument
787 # Turn the query result into a list of ids that the tree view can walk
790 parent_id = query.value(0)
803 ids.insert(0, query.value(2))
804 ids.insert(0, query.value(1))
832 query = QSqlQuery(self.glb.db)
833 …QueryExec(query, "SELECT calls.id, name, short_name, call_time, return_time - call_time" + ipc_str…
840 while query.next():
842 insn_cnt = int(query.value(5))
843 cyc_cnt = int(query.value(6))
844 branch_count = int(query.value(7))
848 branch_count = int(query.value(5))
849 …ld_count, self.comm_id, self.thread_id, query.value(0), query.value(1), query.value(2), query.valu…
912 query = QSqlQuery(self.glb.db)
913 QueryExec(query, "SELECT thread_id, pid, tid"
917 while query.next():
918 …oItem(self.glb, self.params, self.child_count, self.dbid, query.value(0), query.value(1), query.va…
933 query = QSqlQuery(glb.db)
934 QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
935 while query.next():
936 if not query.value(0):
938 …child_item = CallTreeLevelOneItem(glb, params, self.child_count, query.value(0), query.value(1), s…
972 def DoFindSelect(self, query, match): argument
973 QueryExec(query, "SELECT calls.id, comm_id, thread_id"
981 def FindPath(self, query): argument
982 # Turn the query result into a list of ids that the tree view can walk
985 parent_id = query.value(0)
995 ids.insert(0, query.value(2))
996 ids.insert(0, query.value(1))
1180 query = QSqlQuery(db)
1181 QueryExec(query, "SELECT comm_threads.comm_id, comms.c_time, comms.exec_flag"
1188 while query.next():
1190 first = query.value(0)
1191 if query.value(2) and Decimal(query.value(1)) <= Decimal(time):
1192 last = query.value(0)
1306 query = QSqlQuery(db)
1307 QueryExec(query, "SELECT id, c_time"
1314 while query.next():
1315 comm_id = query.value(0)
1318 time = query.value(1)
1326 query = QSqlQuery(db)
1327 QueryExec(query, "SELECT time, thread_out_id, thread_in_id, comm_out_id, comm_in_id, flags"
1332 while query.next():
1333 flags = int(query.value(5))
1336 …if last_thread_id == query.value(1) and last_comm_id is not None and last_comm_id != query.value(3…
1337 self.SelectComms(db, last_thread_id, last_comm_id, last_time, query.value(0))
1342 hregion = self.HRegion(db, query.value(1), query.value(3), start_time)
1344 time = query.value(0)
1345 comm_id = query.value(4)
1346 thread_id = query.value(2)
1355 query = QSqlQuery(db)
1356 QueryExec(query, "SELECT pid, tid FROM threads WHERE id = " + str(thread_id))
1357 if query.next():
1358 pid = query.value(0)
1359 tid = query.value(1)
1363 query = QSqlQuery(db)
1364 QueryExec(query, "SELECT comm FROM comms WHERE id = " + str(comm_id))
1365 if query.next():
1366 comm = query.value(0)
1425 query = QSqlQuery(db)
1426 QueryExec(query, "SELECT DISTINCT cpu"
1429 while query.next():
1430 cpus.append(int(query.value(0)))
2555 self.query = QSqlQuery(self.db)
2569 QueryExec(self.query, stmt)
2572 if not self.query.next():
2574 if not self.query.next():
2576 self.last_id = self.query.value(0)
2577 return self.prep(self.query)
2915 query = QSqlQuery(self.glb.db)
2917 …QueryExec(query, "SELECT cpu, to_dso_id, to_symbol_id, to_sym_offset, short_name, long_name, build…
2922 if not query.next():
2924 cpu = query.value(0)
2925 dso = query.value(1)
2926 sym = query.value(2)
2929 off = query.value(3)
2930 short_name = query.value(4)
2931 long_name = query.value(5)
2932 build_id = query.value(6)
2933 sym_start = query.value(7)
2934 ip = query.value(8)
2936 QueryExec(query, "SELECT samples.dso_id, symbol_id, sym_offset, sym_start"
2942 if not query.next():
2944 if query.value(0) != dso:
2947 bsym = query.value(1)
2948 boff = query.value(2)
2949 bsym_start = query.value(3)
3042 def BranchDataPrepBr(query, data): argument
3043 data.append(tohex(query.value(8)).rjust(16) + " " + query.value(9) + offstr(query.value(10)) +
3044 " (" + dsoname(query.value(11)) + ")" + " -> " +
3045 tohex(query.value(12)) + " " + query.value(13) + offstr(query.value(14)) +
3046 " (" + dsoname(query.value(15)) + ")")
3048 def BranchDataPrepIPC(query, data): argument
3049 insn_cnt = query.value(16)
3050 cyc_cnt = query.value(17)
3056 def BranchDataPrep(query): argument
3059 data.append(query.value(i))
3060 BranchDataPrepBr(query, data)
3063 def BranchDataPrepWA(query): argument
3065 data.append(query.value(0))
3067 data.append("{:>19}".format(query.value(1)))
3069 data.append(query.value(i))
3070 BranchDataPrepBr(query, data)
3073 def BranchDataWithIPCPrep(query): argument
3076 data.append(query.value(i))
3077 BranchDataPrepIPC(query, data)
3078 BranchDataPrepBr(query, data)
3081 def BranchDataWithIPCPrepWA(query): argument
3083 data.append(query.value(0))
3085 data.append("{:>19}".format(query.value(1)))
3087 data.append(query.value(i))
3088 BranchDataPrepIPC(query, data)
3089 BranchDataPrepBr(query, data)
3414 query = QSqlQuery(self.glb.db)
3416 ret = query.exec_(stmt)
3418 while query.next():
3419 ids.append(str(query.value(0)))
3445 query = QSqlQuery(glb.db)
3446 QueryExec(query, "SELECT id, time FROM samples ORDER BY id DESC LIMIT 1")
3447 if query.next():
3448 self.last_id = int(query.value(0))
3456 def IdBetween(self, query, lower_id, higher_id, order): argument
3457 …QueryExec(query, "SELECT id FROM samples WHERE id > " + str(lower_id) + " AND id < " + str(higher_…
3458 if query.next():
3459 return True, int(query.value(0))
3464 query = QSqlQuery(self.glb.db)
3467 QueryExec(query, "SELECT time FROM samples WHERE id = " + str(next_id))
3468 if not query.next():
3469 ok, dbid = self.IdBetween(query, lower_id, next_id, "DESC")
3471 ok, dbid = self.IdBetween(query, next_id, higher_id, "")
3475 QueryExec(query, "SELECT time FROM samples WHERE id = " + str(next_id))
3476 next_time = int(query.value(0))
3655 query = QSqlQuery(db)
3656 QueryExec(query, "SELECT name FROM selected_events WHERE id > 0 ORDER BY id")
3657 while query.next():
3658 events.append(query.value(0))
3664 query = QSqlQuery(db)
3666 QueryExec(query, "SELECT " + columns + " FROM " + table + " " + sql + " LIMIT 1")
3738 def SQLTableDataPrep(self, query, count): argument
3741 data.append(query.value(i))
3754 query = QSqlQuery(glb.db)
3756 QueryExec(query, "PRAGMA table_info(" + table_name + ")")
3757 while query.next():
3758 column_headers.append(query.value(1))
3769 …QueryExec(query, "SELECT column_name FROM information_schema.columns WHERE table_schema = '" + sch…
3770 while query.next():
3771 column_headers.append(query.value(0))
3779 def samples_view_DataPrep(self, query, count): argument
3781 data.append(query.value(0))
3783 data.append("{:>19}".format(query.value(1)))
3785 data.append(query.value(i))
3788 def samples_DataPrep(self, query, count): argument
3791 data.append(query.value(i))
3793 data.append("{:>19}".format(query.value(9)))
3795 data.append(query.value(i))
4122 query = QSqlQuery(glb.db)
4124 …QueryExec(query, "SELECT name FROM sqlite_master WHERE type IN ( 'table' , 'view' ) ORDER BY name")
4126 …QueryExec(query, "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' A…
4127 while query.next():
4128 tables.append(query.value(0))
4509 query = QSqlQuery(db)
4510 QueryExec(query, "SELECT VERSION()")
4511 if query.next():
4512 v_str = query.value(0)
4522 query = QSqlQuery(db)
4523 QueryExec(query, "SELECT sqlite_version()")
4524 if query.next():
4525 return query.value(0)
4838 query = QSqlQuery(self.db)
4839 QueryExec(query, "SELECT id FROM machines WHERE pid = -1")
4840 if query.next():
4841 self.host_machine_id = query.value(0)
4852 query = QSqlQuery(self.db)
4854 QueryExec(query, sql)
4857 if query.next():
4858 return Decimal(query.value(0))