1
0
Fork 0

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: 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>
hifive-unleashed-5.2
Adrian Hunter 2019-05-03 15:08:25 +03:00 committed by Arnaldo Carvalho de Melo
parent 4b2084537e
commit 3ac641f4ac
1 changed files with 4 additions and 0 deletions

View File

@ -456,6 +456,10 @@ class CallGraphLevelItemBase(object):
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]