[lkml]   [2018]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[tip:perf/urgent] perf scripts python: Fix table find when table re-ordered
Commit-ID:  35fa1cee21e34f43db928d022610707d5a234faf
Author: Adrian Hunter <>
AuthorDate: Sun, 4 Nov 2018 17:12:38 +0200
Committer: Arnaldo Carvalho de Melo <>
CommitDate: Mon, 5 Nov 2018 14:53:00 -0300

perf scripts python: Fix table find when table re-ordered

Table rows can be re-ordered by selecting a column to sort by. After
re-ordering, the "find" operation was highlighting the wrong row, fix

Signed-off-by: Adrian Hunter <>
Cc: Andi Kleen <>
Cc: Jiri Olsa <>
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/scripts/python/ | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/scripts/python/ b/tools/perf/scripts/python/
index c2fcf6c5237a..f278ce5ebab7 100755
--- a/tools/perf/scripts/python/
+++ b/tools/perf/scripts/python/
@@ -1975,7 +1975,7 @@ class TableWindow(QMdiSubWindow, ResizeColumnsToContentsBase):
def FindDone(self, row):
if row >= 0:
- self.view.setCurrentIndex(self.model.index(row, 0, QModelIndex()))
+ self.view.setCurrentIndex(self.model.mapFromSource(self.data_model.index(row, 0, QModelIndex())))

@@ -2188,6 +2188,8 @@ For PostgreSQL databases, information_schema.tables/views/columns are included.
Ctrl-F displays a Find bar which finds substrings by either an exact match or a regular expression match.
Refer to Python documentation for the regular expression syntax.
All columns are searched, but only currently fetched rows are searched.
+<p>N.B. Results are found in id order, so if the table is re-ordered, find-next and find-previous
+will go to the next/previous result in id order, instead of display order.

# Help window
 \ /
  Last update: 2018-11-06 20:17    [W:0.060 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site