Skip to content

Commit

Permalink
perf scripts python: exported-sql-viewer.py: Add tree level
Browse files Browse the repository at this point in the history
As preparation for adding support for copying to clipboard, keep track of
what level each item is in tree items.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190503120828.25326-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Adrian Hunter authored and Arnaldo Carvalho de Melo committed May 15, 2019
1 parent 4b20845 commit 3ac641f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/perf/scripts/python/exported-sql-viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ def __init__(self, glb, row, parent_item):
self.query_done = False;
self.child_count = 0
self.child_items = []
if parent_item:
self.level = parent_item.level + 1
else:
self.level = 0

def getChildItem(self, row):
return self.child_items[row]
Expand Down

0 comments on commit 3ac641f

Please sign in to comment.