perf scripts python: call-graph-from-sql.py: Refactor TreeItem class
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 1 Oct 2018 06:28:45 +0000 (09:28 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Oct 2018 17:26:06 +0000 (14:26 -0300)
commit341e73cbd3019d350d1271803b45d84af88f2408
treee15524ae20116722e22858e2f4c97703ec503707
parent4be9ace7e1cdcb44c1fba1fb41ec2b92dda06732
perf scripts python: call-graph-from-sql.py: Refactor TreeItem class

class TreeItem represents items at all levels of the call-graph tree.
However, not all the levels represent the same data i.e. the top-level is
comms, the next level is threads, and subsequent levels are functions.
Consequently it is simpler to have separate classes for different levels
with commonality in a base class. Refactor TreeItem class accordingly.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20181001062853.28285-12-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/scripts/python/call-graph-from-sql.py