Commit 92f9f1f2 authored by eseidel@chromium.org's avatar eseidel@chromium.org

Work around --profiler=perf failure with recent linux perf.

Looks like perf --call-graph now requires an argument
in the most recent perf binary.  That's probably a bug
in perf, but moving back to -g for now.

I tried running the telemetry tests, but gave up
after several minutes of gorilla videos stealing focus from my browser.

I found
src/tools/telemetry/telemetry/core/platform/profiler/perf_profiler_unittest.py
but it didn't seem to attempt to test this code
(or have a recommended way for instantiating this kind of
PerfProfiler so I could call this instance method) so I
gave up on testing.

BUG=366928

Review URL: https://codereview.chromium.org/257463007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266272 0039d316-1c4b-4281-b951-d872f2087c98
parent ef395109
...@@ -41,8 +41,10 @@ class _SingleProcessPerfProfiler(object): ...@@ -41,8 +41,10 @@ class _SingleProcessPerfProfiler(object):
'mkdir -p ' + os.path.dirname(self._device_output_file)) 'mkdir -p ' + os.path.dirname(self._device_output_file))
else: else:
cmd_prefix = ['perf'] cmd_prefix = ['perf']
# In perf 3.13 --call-graph requires an argument, so use
# the -g short-hand which does not.
self._proc = subprocess.Popen(cmd_prefix + self._proc = subprocess.Popen(cmd_prefix +
['record', '--call-graph', ['record', '-g',
'--pid', str(pid), '--output', output_file], '--pid', str(pid), '--output', output_file],
stdout=self._tmp_output_file, stderr=subprocess.STDOUT) stdout=self._tmp_output_file, stderr=subprocess.STDOUT)
......
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