The "parent" sort to perf report is most useful when a call graph
is included in the trace, so if we see parent in the sort keys,
pass the -g option to perf record to get that output in the trace.

Change-Id: I764eacf8ec3510dfdd91be2bea025d145d515f94
---
 client/profilers/perf/perf.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py
index e6f9bb7..4aadbb1 100644
--- a/client/profilers/perf/perf.py
+++ b/client/profilers/perf/perf.py
@@ -36,6 +36,8 @@ class perf(profiler.profiler):
         self.logfile = os.path.join(test.profdir, "perf")
         cmd = ("%s record -a -o %s" %
                (self.perf_bin, self.logfile))
+        if "parent" in self.sort_keys:
+            cmd += " -g"
         for event in self.events:
             cmd += " -e %s" % event
         self._process = subprocess.Popen(cmd, shell=True,
-- 
1.7.3.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to