diff options
Diffstat (limited to 'tools/perf/scripts/python')
| -rwxr-xr-x | tools/perf/scripts/python/exported-sql-viewer.py | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py index 09ce73b07d35..df854f0a69f0 100755 --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py | |||
| @@ -693,28 +693,16 @@ class VBox(): | |||
| 693 | def Widget(self): | 693 | def Widget(self): |
| 694 | return self.vbox | 694 | return self.vbox |
| 695 | 695 | ||
| 696 | # Context-sensitive call graph window | 696 | # Tree window base |
| 697 | |||
| 698 | class CallGraphWindow(QMdiSubWindow): | ||
| 699 | |||
| 700 | def __init__(self, glb, parent=None): | ||
| 701 | super(CallGraphWindow, self).__init__(parent) | ||
| 702 | 697 | ||
| 703 | self.model = LookupCreateModel("Context-Sensitive Call Graph", lambda x=glb: CallGraphModel(x)) | 698 | class TreeWindowBase(QMdiSubWindow): |
| 704 | 699 | ||
| 705 | self.view = QTreeView() | 700 | def __init__(self, parent=None): |
| 706 | self.view.setModel(self.model) | 701 | super(TreeWindowBase, self).__init__(parent) |
| 707 | |||
| 708 | for c, w in ((0, 250), (1, 100), (2, 60), (3, 70), (4, 70), (5, 100)): | ||
| 709 | self.view.setColumnWidth(c, w) | ||
| 710 | |||
| 711 | self.find_bar = FindBar(self, self) | ||
| 712 | |||
| 713 | self.vbox = VBox(self.view, self.find_bar.Widget()) | ||
| 714 | |||
| 715 | self.setWidget(self.vbox.Widget()) | ||
| 716 | 702 | ||
| 717 | AddSubWindow(glb.mainwindow.mdi_area, self, "Context-Sensitive Call Graph") | 703 | self.model = None |
| 704 | self.view = None | ||
| 705 | self.find_bar = None | ||
| 718 | 706 | ||
| 719 | def DisplayFound(self, ids): | 707 | def DisplayFound(self, ids): |
| 720 | if not len(ids): | 708 | if not len(ids): |
| @@ -747,6 +735,30 @@ class CallGraphWindow(QMdiSubWindow): | |||
| 747 | if not found: | 735 | if not found: |
| 748 | self.find_bar.NotFound() | 736 | self.find_bar.NotFound() |
| 749 | 737 | ||
| 738 | |||
| 739 | # Context-sensitive call graph window | ||
| 740 | |||
| 741 | class CallGraphWindow(TreeWindowBase): | ||
| 742 | |||
| 743 | def __init__(self, glb, parent=None): | ||
| 744 | super(CallGraphWindow, self).__init__(parent) | ||
| 745 | |||
| 746 | self.model = LookupCreateModel("Context-Sensitive Call Graph", lambda x=glb: CallGraphModel(x)) | ||
| 747 | |||
| 748 | self.view = QTreeView() | ||
| 749 | self.view.setModel(self.model) | ||
| 750 | |||
| 751 | for c, w in ((0, 250), (1, 100), (2, 60), (3, 70), (4, 70), (5, 100)): | ||
| 752 | self.view.setColumnWidth(c, w) | ||
| 753 | |||
| 754 | self.find_bar = FindBar(self, self) | ||
| 755 | |||
| 756 | self.vbox = VBox(self.view, self.find_bar.Widget()) | ||
| 757 | |||
| 758 | self.setWidget(self.vbox.Widget()) | ||
| 759 | |||
| 760 | AddSubWindow(glb.mainwindow.mdi_area, self, "Context-Sensitive Call Graph") | ||
| 761 | |||
| 750 | # Child data item finder | 762 | # Child data item finder |
| 751 | 763 | ||
| 752 | class ChildDataItemFinder(): | 764 | class ChildDataItemFinder(): |
