Commit 3ac641f4 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf scripts python: exported-sql-viewer.py: Add tree level

As preparation for adding support for copying to clipboard, keep track of
what level each item is in tree items.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190503120828.25326-4-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4b208453
...@@ -456,6 +456,10 @@ class CallGraphLevelItemBase(object): ...@@ -456,6 +456,10 @@ class CallGraphLevelItemBase(object):
self.query_done = False; self.query_done = False;
self.child_count = 0 self.child_count = 0
self.child_items = [] self.child_items = []
if parent_item:
self.level = parent_item.level + 1
else:
self.level = 0
def getChildItem(self, row): def getChildItem(self, row):
return self.child_items[row] return self.child_items[row]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment