lkml.org 
[lkml]   [2019]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/6] perf scripts python: exported-sql-viewer.py: Add tree level
    Date
    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>
    ---
    tools/perf/scripts/python/exported-sql-viewer.py | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
    index 73fc02d6d1e4..c0fb88d440ba 100755
    --- a/tools/perf/scripts/python/exported-sql-viewer.py
    +++ b/tools/perf/scripts/python/exported-sql-viewer.py
    @@ -470,6 +470,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]
    --
    2.17.1
    \
     
     \ /
      Last update: 2019-05-03 14:10    [W:4.064 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site