Lines Matching refs: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
689 self.DoFindSelect(query, match)
691 def Found(self, query, found): argument
693 return self.FindPath(query)
696 def FindValue(self, value, pattern, query, last_value, last_pattern): argument
698 found = query.first()
700 self.FindSelect(value, pattern, query)
701 found = query.next()
702 return self.Found(query, found)
704 def FindNext(self, query): argument
705 found = query.next()
707 found = query.first()
708 return self.Found(query, found)
710 def FindPrev(self, query): argument
711 found = query.previous()
713 found = query.last()
714 return self.Found(query, found)
718 ids = self.FindValue(c.value, c.pattern, c.query, c.last_value, c.last_pattern)
720 ids = self.FindNext(c.query)
722 ids = self.FindPrev(c.query)
728 self.value, self.direction, self.pattern, self.query, self.last_value, self.last_pattern = x
773 def DoFindSelect(self, query, match): argument
774 QueryExec(query, "SELECT call_path_id, comm_id, thread_id"
783 def FindPath(self, query): argument
787 parent_id = query.value(0)
800 ids.insert(0, query.value(2))
801 ids.insert(0, query.value(1))
829 query = QSqlQuery(self.glb.db)
830 …QueryExec(query, "SELECT calls.id, name, short_name, call_time, return_time - call_time" + ipc_str…
837 while query.next():
839 insn_cnt = int(query.value(5))
840 cyc_cnt = int(query.value(6))
841 branch_count = int(query.value(7))
845 branch_count = int(query.value(5))
846 …ld_count, self.comm_id, self.thread_id, query.value(0), query.value(1), query.value(2), query.valu…
909 query = QSqlQuery(self.glb.db)
910 QueryExec(query, "SELECT thread_id, pid, tid"
914 while query.next():
915 …oItem(self.glb, self.params, self.child_count, self.dbid, query.value(0), query.value(1), query.va…
930 query = QSqlQuery(glb.db)
931 QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
932 while query.next():
933 if not query.value(0):
935 …child_item = CallTreeLevelOneItem(glb, params, self.child_count, query.value(0), query.value(1), s…
969 def DoFindSelect(self, query, match): argument
970 QueryExec(query, "SELECT calls.id, comm_id, thread_id"
978 def FindPath(self, query): argument
982 parent_id = query.value(0)
992 ids.insert(0, query.value(2))
993 ids.insert(0, query.value(1))
1177 query = QSqlQuery(db)
1178 QueryExec(query, "SELECT comm_threads.comm_id, comms.c_time, comms.exec_flag"
1185 while query.next():
1187 first = query.value(0)
1188 if query.value(2) and Decimal(query.value(1)) <= Decimal(time):
1189 last = query.value(0)
1303 query = QSqlQuery(db)
1304 QueryExec(query, "SELECT id, c_time"
1311 while query.next():
1312 comm_id = query.value(0)
1315 time = query.value(1)
1323 query = QSqlQuery(db)
1324 QueryExec(query, "SELECT time, thread_out_id, thread_in_id, comm_out_id, comm_in_id, flags"
1329 while query.next():
1330 flags = int(query.value(5))
1333 …if last_thread_id == query.value(1) and last_comm_id is not None and last_comm_id != query.value(3…
1334 self.SelectComms(db, last_thread_id, last_comm_id, last_time, query.value(0))
1339 hregion = self.HRegion(db, query.value(1), query.value(3), start_time)
1341 time = query.value(0)
1342 comm_id = query.value(4)
1343 thread_id = query.value(2)
1352 query = QSqlQuery(db)
1353 QueryExec(query, "SELECT pid, tid FROM threads WHERE id = " + str(thread_id))
1354 if query.next():
1355 pid = query.value(0)
1356 tid = query.value(1)
1360 query = QSqlQuery(db)
1361 QueryExec(query, "SELECT comm FROM comms WHERE id = " + str(comm_id))
1362 if query.next():
1363 comm = query.value(0)
1422 query = QSqlQuery(db)
1423 QueryExec(query, "SELECT DISTINCT cpu"
1426 while query.next():
1427 cpus.append(int(query.value(0)))
2552 self.query = QSqlQuery(self.db)
2566 QueryExec(self.query, stmt)
2569 if not self.query.next():
2571 if not self.query.next():
2573 self.last_id = self.query.value(0)
2574 return self.prep(self.query)
2912 query = QSqlQuery(self.glb.db)
2914 …QueryExec(query, "SELECT cpu, to_dso_id, to_symbol_id, to_sym_offset, short_name, long_name, build…
2919 if not query.next():
2921 cpu = query.value(0)
2922 dso = query.value(1)
2923 sym = query.value(2)
2926 off = query.value(3)
2927 short_name = query.value(4)
2928 long_name = query.value(5)
2929 build_id = query.value(6)
2930 sym_start = query.value(7)
2931 ip = query.value(8)
2933 QueryExec(query, "SELECT samples.dso_id, symbol_id, sym_offset, sym_start"
2939 if not query.next():
2941 if query.value(0) != dso:
2944 bsym = query.value(1)
2945 boff = query.value(2)
2946 bsym_start = query.value(3)
3039 def BranchDataPrepBr(query, data): argument
3040 data.append(tohex(query.value(8)).rjust(16) + " " + query.value(9) + offstr(query.value(10)) +
3041 " (" + dsoname(query.value(11)) + ")" + " -> " +
3042 tohex(query.value(12)) + " " + query.value(13) + offstr(query.value(14)) +
3043 " (" + dsoname(query.value(15)) + ")")
3045 def BranchDataPrepIPC(query, data): argument
3046 insn_cnt = query.value(16)
3047 cyc_cnt = query.value(17)
3053 def BranchDataPrep(query): argument
3056 data.append(query.value(i))
3057 BranchDataPrepBr(query, data)
3060 def BranchDataPrepWA(query): argument
3062 data.append(query.value(0))
3064 data.append("{:>19}".format(query.value(1)))
3066 data.append(query.value(i))
3067 BranchDataPrepBr(query, data)
3070 def BranchDataWithIPCPrep(query): argument
3073 data.append(query.value(i))
3074 BranchDataPrepIPC(query, data)
3075 BranchDataPrepBr(query, data)
3078 def BranchDataWithIPCPrepWA(query): argument
3080 data.append(query.value(0))
3082 data.append("{:>19}".format(query.value(1)))
3084 data.append(query.value(i))
3085 BranchDataPrepIPC(query, data)
3086 BranchDataPrepBr(query, data)
3411 query = QSqlQuery(self.glb.db)
3413 ret = query.exec_(stmt)
3415 while query.next():
3416 ids.append(str(query.value(0)))
3442 query = QSqlQuery(glb.db)
3443 QueryExec(query, "SELECT id, time FROM samples ORDER BY id DESC LIMIT 1")
3444 if query.next():
3445 self.last_id = int(query.value(0))
3453 def IdBetween(self, query, lower_id, higher_id, order): argument
3454 …QueryExec(query, "SELECT id FROM samples WHERE id > " + str(lower_id) + " AND id < " + str(higher_…
3455 if query.next():
3456 return True, int(query.value(0))
3461 query = QSqlQuery(self.glb.db)
3464 QueryExec(query, "SELECT time FROM samples WHERE id = " + str(next_id))
3465 if not query.next():
3466 ok, dbid = self.IdBetween(query, lower_id, next_id, "DESC")
3468 ok, dbid = self.IdBetween(query, next_id, higher_id, "")
3472 QueryExec(query, "SELECT time FROM samples WHERE id = " + str(next_id))
3473 next_time = int(query.value(0))
3652 query = QSqlQuery(db)
3653 QueryExec(query, "SELECT name FROM selected_events WHERE id > 0 ORDER BY id")
3654 while query.next():
3655 events.append(query.value(0))
3661 query = QSqlQuery(db)
3663 QueryExec(query, "SELECT " + columns + " FROM " + table + " " + sql + " LIMIT 1")
3735 def SQLTableDataPrep(self, query, count): argument
3738 data.append(query.value(i))
3751 query = QSqlQuery(glb.db)
3753 QueryExec(query, "PRAGMA table_info(" + table_name + ")")
3754 while query.next():
3755 column_headers.append(query.value(1))
3766 …QueryExec(query, "SELECT column_name FROM information_schema.columns WHERE table_schema = '" + sch…
3767 while query.next():
3768 column_headers.append(query.value(0))
3776 def samples_view_DataPrep(self, query, count): argument
3778 data.append(query.value(0))
3780 data.append("{:>19}".format(query.value(1)))
3782 data.append(query.value(i))
3785 def samples_DataPrep(self, query, count): argument
3788 data.append(query.value(i))
3790 data.append("{:>19}".format(query.value(9)))
3792 data.append(query.value(i))
4119 query = QSqlQuery(glb.db)
4121 …QueryExec(query, "SELECT name FROM sqlite_master WHERE type IN ( 'table' , 'view' ) ORDER BY name")
4123 …QueryExec(query, "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' A…
4124 while query.next():
4125 tables.append(query.value(0))
4506 query = QSqlQuery(db)
4507 QueryExec(query, "SELECT VERSION()")
4508 if query.next():
4509 v_str = query.value(0)
4519 query = QSqlQuery(db)
4520 QueryExec(query, "SELECT sqlite_version()")
4521 if query.next():
4522 return query.value(0)
4835 query = QSqlQuery(self.db)
4836 QueryExec(query, "SELECT id FROM machines WHERE pid = -1")
4837 if query.next():
4838 self.host_machine_id = query.value(0)
4849 query = QSqlQuery(self.db)
4851 QueryExec(query, sql)
4854 if query.next():
4855 return Decimal(query.value(0))