Lines Matching full:query
176 def QueryExec(query, stmt): argument
177 ret = query.exec_(stmt)
179 raise Exception("Query failed: " + query.lastError().text())
533 query = QSqlQuery(self.glb.db)
538 …QueryExec(query, "SELECT call_path_id, name, short_name, COUNT(calls.id), SUM(return_time - call_t…
548 while query.next():
550 insn_cnt = int(query.value(5))
551 cyc_cnt = int(query.value(6))
552 branch_count = int(query.value(7))
556 branch_count = int(query.value(5))
557 …ld_count, self.comm_id, self.thread_id, query.value(0), query.value(1), query.value(2), query.valu…
620 query = QSqlQuery(self.glb.db)
621 QueryExec(query, "SELECT thread_id, pid, tid"
625 while query.next():
626 …oItem(self.glb, self.params, self.child_count, self.dbid, query.value(0), query.value(1), query.va…
641 query = QSqlQuery(glb.db)
642 QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
643 while query.next():
644 if not query.value(0):
646 …child_item = CallGraphLevelOneItem(glb, params, self.child_count, query.value(0), query.value(1), …
664 def FindSelect(self, value, pattern, query): argument
682 self.DoFindSelect(query, match)
684 def Found(self, query, found): argument
686 return self.FindPath(query)
689 def FindValue(self, value, pattern, query, last_value, last_pattern): argument
691 found = query.first()
693 self.FindSelect(value, pattern, query)
694 found = query.next()
695 return self.Found(query, found)
697 def FindNext(self, query): argument
698 found = query.next()
700 found = query.first()
701 return self.Found(query, found)
703 def FindPrev(self, query): argument
704 found = query.previous()
706 found = query.last()
707 return self.Found(query, found)
711 ids = self.FindValue(c.value, c.pattern, c.query, c.last_value, c.last_pattern)
713 ids = self.FindNext(c.query)
715 ids = self.FindPrev(c.query)
721 self.value, self.direction, self.pattern, self.query, self.last_value, self.last_pattern = x
766 def DoFindSelect(self, query, match): argument
767 QueryExec(query, "SELECT call_path_id, comm_id, thread_id"
776 def FindPath(self, query): argument
777 # Turn the query result into a list of ids that the tree view can walk
780 parent_id = query.value(0)
793 ids.insert(0, query.value(2))
794 ids.insert(0, query.value(1))
822 query = QSqlQuery(self.glb.db)
823 …QueryExec(query, "SELECT calls.id, name, short_name, call_time, return_time - call_time" + ipc_str…
830 while query.next():
832 insn_cnt = int(query.value(5))
833 cyc_cnt = int(query.value(6))
834 branch_count = int(query.value(7))
838 branch_count = int(query.value(5))
839 …ld_count, self.comm_id, self.thread_id, query.value(0), query.value(1), query.value(2), query.valu…
902 query = QSqlQuery(self.glb.db)
903 QueryExec(query, "SELECT thread_id, pid, tid"
907 while query.next():
908 …oItem(self.glb, self.params, self.child_count, self.dbid, query.value(0), query.value(1), query.va…
923 query = QSqlQuery(glb.db)
924 QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
925 while query.next():
926 if not query.value(0):
928 …child_item = CallTreeLevelOneItem(glb, params, self.child_count, query.value(0), query.value(1), s…
962 def DoFindSelect(self, query, match): argument
963 QueryExec(query, "SELECT calls.id, comm_id, thread_id"
971 def FindPath(self, query): argument
972 # Turn the query result into a list of ids that the tree view can walk
975 parent_id = query.value(0)
985 ids.insert(0, query.value(2))
986 ids.insert(0, query.value(1))
1170 query = QSqlQuery(db)
1171 QueryExec(query, "SELECT comm_threads.comm_id, comms.c_time, comms.exec_flag"
1178 while query.next():
1180 first = query.value(0)
1181 if query.value(2) and Decimal(query.value(1)) <= Decimal(time):
1182 last = query.value(0)
1296 query = QSqlQuery(db)
1297 QueryExec(query, "SELECT id, c_time"
1304 while query.next():
1305 comm_id = query.value(0)
1308 time = query.value(1)
1316 query = QSqlQuery(db)
1317 QueryExec(query, "SELECT time, thread_out_id, thread_in_id, comm_out_id, comm_in_id, flags"
1322 while query.next():
1323 flags = int(query.value(5))
1326 …if last_thread_id == query.value(1) and last_comm_id is not None and last_comm_id != query.value(3…
1327 self.SelectComms(db, last_thread_id, last_comm_id, last_time, query.value(0))
1332 hregion = self.HRegion(db, query.value(1), query.value(3), start_time)
1334 time = query.value(0)
1335 comm_id = query.value(4)
1336 thread_id = query.value(2)
1345 query = QSqlQuery(db)
1346 QueryExec(query, "SELECT pid, tid FROM threads WHERE id = " + str(thread_id))
1347 if query.next():
1348 pid = query.value(0)
1349 tid = query.value(1)
1353 query = QSqlQuery(db)
1354 QueryExec(query, "SELECT comm FROM comms WHERE id = " + str(comm_id))
1355 if query.next():
1356 comm = query.value(0)
1415 query = QSqlQuery(db)
1416 QueryExec(query, "SELECT DISTINCT cpu"
1419 while query.next():
1420 cpus.append(int(query.value(0)))
2545 self.query = QSqlQuery(self.db)
2559 QueryExec(self.query, stmt)
2562 if not self.query.next():
2564 if not self.query.next():
2566 self.last_id = self.query.value(0)
2567 return self.prep(self.query)
2905 query = QSqlQuery(self.glb.db)
2907 …QueryExec(query, "SELECT cpu, to_dso_id, to_symbol_id, to_sym_offset, short_name, long_name, build…
2912 if not query.next():
2914 cpu = query.value(0)
2915 dso = query.value(1)
2916 sym = query.value(2)
2919 off = query.value(3)
2920 short_name = query.value(4)
2921 long_name = query.value(5)
2922 build_id = query.value(6)
2923 sym_start = query.value(7)
2924 ip = query.value(8)
2926 QueryExec(query, "SELECT samples.dso_id, symbol_id, sym_offset, sym_start"
2932 if not query.next():
2934 if query.value(0) != dso:
2937 bsym = query.value(1)
2938 boff = query.value(2)
2939 bsym_start = query.value(3)
3032 def BranchDataPrepBr(query, data): argument
3033 data.append(tohex(query.value(8)).rjust(16) + " " + query.value(9) + offstr(query.value(10)) +
3034 " (" + dsoname(query.value(11)) + ")" + " -> " +
3035 tohex(query.value(12)) + " " + query.value(13) + offstr(query.value(14)) +
3036 " (" + dsoname(query.value(15)) + ")")
3038 def BranchDataPrepIPC(query, data): argument
3039 insn_cnt = query.value(16)
3040 cyc_cnt = query.value(17)
3046 def BranchDataPrep(query): argument
3049 data.append(query.value(i))
3050 BranchDataPrepBr(query, data)
3053 def BranchDataPrepWA(query): argument
3055 data.append(query.value(0))
3057 data.append("{:>19}".format(query.value(1)))
3059 data.append(query.value(i))
3060 BranchDataPrepBr(query, data)
3063 def BranchDataWithIPCPrep(query): argument
3066 data.append(query.value(i))
3067 BranchDataPrepIPC(query, data)
3068 BranchDataPrepBr(query, data)
3071 def BranchDataWithIPCPrepWA(query): argument
3073 data.append(query.value(0))
3075 data.append("{:>19}".format(query.value(1)))
3077 data.append(query.value(i))
3078 BranchDataPrepIPC(query, data)
3079 BranchDataPrepBr(query, data)
3404 query = QSqlQuery(self.glb.db)
3406 ret = query.exec_(stmt)
3408 while query.next():
3409 ids.append(str(query.value(0)))
3435 query = QSqlQuery(glb.db)
3436 QueryExec(query, "SELECT id, time FROM samples ORDER BY id DESC LIMIT 1")
3437 if query.next():
3438 self.last_id = int(query.value(0))
3446 def IdBetween(self, query, lower_id, higher_id, order): argument
3447 …QueryExec(query, "SELECT id FROM samples WHERE id > " + str(lower_id) + " AND id < " + str(higher_…
3448 if query.next():
3449 return True, int(query.value(0))
3454 query = QSqlQuery(self.glb.db)
3457 QueryExec(query, "SELECT time FROM samples WHERE id = " + str(next_id))
3458 if not query.next():
3459 ok, dbid = self.IdBetween(query, lower_id, next_id, "DESC")
3461 ok, dbid = self.IdBetween(query, next_id, higher_id, "")
3465 QueryExec(query, "SELECT time FROM samples WHERE id = " + str(next_id))
3466 next_time = int(query.value(0))
3645 query = QSqlQuery(db)
3646 QueryExec(query, "SELECT name FROM selected_events WHERE id > 0 ORDER BY id")
3647 while query.next():
3648 events.append(query.value(0))
3654 query = QSqlQuery(db)
3656 QueryExec(query, "SELECT " + columns + " FROM " + table + " " + sql + " LIMIT 1")
3728 def SQLTableDataPrep(self, query, count): argument
3731 data.append(query.value(i))
3744 query = QSqlQuery(glb.db)
3746 QueryExec(query, "PRAGMA table_info(" + table_name + ")")
3747 while query.next():
3748 column_headers.append(query.value(1))
3759 …QueryExec(query, "SELECT column_name FROM information_schema.columns WHERE table_schema = '" + sch…
3760 while query.next():
3761 column_headers.append(query.value(0))
3769 def samples_view_DataPrep(self, query, count): argument
3771 data.append(query.value(0))
3773 data.append("{:>19}".format(query.value(1)))
3775 data.append(query.value(i))
3778 def samples_DataPrep(self, query, count): argument
3781 data.append(query.value(i))
3783 data.append("{:>19}".format(query.value(9)))
3785 data.append(query.value(i))
4112 query = QSqlQuery(glb.db)
4114 …QueryExec(query, "SELECT name FROM sqlite_master WHERE type IN ( 'table' , 'view' ) ORDER BY name")
4116 …QueryExec(query, "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' A…
4117 while query.next():
4118 tables.append(query.value(0))
4499 query = QSqlQuery(db)
4500 QueryExec(query, "SELECT VERSION()")
4501 if query.next():
4502 v_str = query.value(0)
4512 query = QSqlQuery(db)
4513 QueryExec(query, "SELECT sqlite_version()")
4514 if query.next():
4515 return query.value(0)
4916 query = QSqlQuery(self.db)
4917 QueryExec(query, "SELECT id FROM machines WHERE pid = -1")
4918 if query.next():
4919 self.host_machine_id = query.value(0)
4930 query = QSqlQuery(self.db)
4932 QueryExec(query, sql)
4935 if query.next():
4936 return Decimal(query.value(0))