diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2019-02-22 02:27:24 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-02-22 14:52:07 -0500 |
commit | 947cc38d47249bb83111b2607e1074b7d12338ba (patch) | |
tree | 7c99e702b4979eda4e851cb3184c35b334b19526 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 0bf0947a954f58517747ca215b3122b47ced3424 (diff) |
perf scripts python: exported-sql-viewer.py: Move report name into ReportVars
The report name is a report variable so move it into into ReportVars.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-rwxr-xr-x | tools/perf/scripts/python/exported-sql-viewer.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py index 03428df8ddd5..ed39a0153dd3 100755 --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py | |||
@@ -1402,7 +1402,8 @@ class BranchModel(TreeModel): | |||
1402 | 1402 | ||
1403 | class ReportVars(): | 1403 | class ReportVars(): |
1404 | 1404 | ||
1405 | def __init__(self, where_clause = ""): | 1405 | def __init__(self, name = "", where_clause = ""): |
1406 | self.name = name | ||
1406 | self.where_clause = where_clause | 1407 | self.where_clause = where_clause |
1407 | 1408 | ||
1408 | def UniqueId(self): | 1409 | def UniqueId(self): |
@@ -1412,7 +1413,7 @@ class ReportVars(): | |||
1412 | 1413 | ||
1413 | class BranchWindow(QMdiSubWindow): | 1414 | class BranchWindow(QMdiSubWindow): |
1414 | 1415 | ||
1415 | def __init__(self, glb, event_id, name, report_vars, parent=None): | 1416 | def __init__(self, glb, event_id, report_vars, parent=None): |
1416 | super(BranchWindow, self).__init__(parent) | 1417 | super(BranchWindow, self).__init__(parent) |
1417 | 1418 | ||
1418 | model_name = "Branch Events " + str(event_id) + " " + report_vars.UniqueId() | 1419 | model_name = "Branch Events " + str(event_id) + " " + report_vars.UniqueId() |
@@ -1435,7 +1436,7 @@ class BranchWindow(QMdiSubWindow): | |||
1435 | 1436 | ||
1436 | self.setWidget(self.vbox.Widget()) | 1437 | self.setWidget(self.vbox.Widget()) |
1437 | 1438 | ||
1438 | AddSubWindow(glb.mainwindow.mdi_area, self, name + " Branch Events") | 1439 | AddSubWindow(glb.mainwindow.mdi_area, self, report_vars.name + " Branch Events") |
1439 | 1440 | ||
1440 | def ResizeColumnToContents(self, column, n): | 1441 | def ResizeColumnToContents(self, column, n): |
1441 | # Using the view's resizeColumnToContents() here is extrememly slow | 1442 | # Using the view's resizeColumnToContents() here is extrememly slow |
@@ -1710,7 +1711,6 @@ class ReportDialogBase(QDialog): | |||
1710 | 1711 | ||
1711 | self.glb = glb | 1712 | self.glb = glb |
1712 | 1713 | ||
1713 | self.name = "" | ||
1714 | self.report_vars = ReportVars() | 1714 | self.report_vars = ReportVars() |
1715 | 1715 | ||
1716 | self.setWindowTitle(title) | 1716 | self.setWindowTitle(title) |
@@ -1751,8 +1751,8 @@ class ReportDialogBase(QDialog): | |||
1751 | 1751 | ||
1752 | def Ok(self): | 1752 | def Ok(self): |
1753 | vars = self.report_vars | 1753 | vars = self.report_vars |
1754 | self.name = self.data_items[0].value | 1754 | vars.name = self.data_items[0].value |
1755 | if not self.name: | 1755 | if not vars.name: |
1756 | self.ShowMessage("Report name is required") | 1756 | self.ShowMessage("Report name is required") |
1757 | return | 1757 | return |
1758 | for d in self.data_items: | 1758 | for d in self.data_items: |
@@ -2392,13 +2392,13 @@ class MainWindow(QMainWindow): | |||
2392 | CallGraphWindow(self.glb, self) | 2392 | CallGraphWindow(self.glb, self) |
2393 | 2393 | ||
2394 | def NewBranchView(self, event_id): | 2394 | def NewBranchView(self, event_id): |
2395 | BranchWindow(self.glb, event_id, "", ReportVars(), self) | 2395 | BranchWindow(self.glb, event_id, ReportVars(), self) |
2396 | 2396 | ||
2397 | def NewSelectedBranchView(self, event_id): | 2397 | def NewSelectedBranchView(self, event_id): |
2398 | dialog = SelectedBranchDialog(self.glb, self) | 2398 | dialog = SelectedBranchDialog(self.glb, self) |
2399 | ret = dialog.exec_() | 2399 | ret = dialog.exec_() |
2400 | if ret: | 2400 | if ret: |
2401 | BranchWindow(self.glb, event_id, dialog.name, dialog.report_vars, self) | 2401 | BranchWindow(self.glb, event_id, dialog.report_vars, self) |
2402 | 2402 | ||
2403 | def NewTableView(self, table_name): | 2403 | def NewTableView(self, table_name): |
2404 | TableWindow(self.glb, table_name, self) | 2404 | TableWindow(self.glb, table_name, self) |