Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py

Issue 659073005: [Telemetry] Fix flake in testVTuneProfiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py b/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
index c0a03f5028a81a5b6cb735c8618e24dcfbf2b706..96f08782c077607c71e4cfe091cfd90392672aba 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/vtune_profiler.py
@@ -8,6 +8,7 @@ import subprocess
import sys
import tempfile
+from telemetry.core import exceptions
from telemetry.core.platform import profiler
from telemetry.core.platform.profiler import android_profiling_helper
@@ -30,11 +31,13 @@ class _SingleProcessVTuneProfiler(object):
cmd, stdout=self._tmp_output_file, stderr=subprocess.STDOUT)
def CollectProfile(self):
- if ('renderer' in self._output_file and
- not self._platform_backend.GetCommandLine(self._pid)):
- logging.warning('Renderer was swapped out during profiling. '
- 'To collect a full profile rerun with '
- '"--extra-browser-args=--single-process"')
+ if 'renderer' in self._output_file:
+ try:
+ self._platform_backend.GetCommandLine(self._pid)
+ except exceptions.ProcessGoneException:
+ logging.warning('Renderer was swapped out during profiling. '
+ 'To collect a full profile rerun with '
+ '"--extra-browser-args=--single-process"')
subprocess.call(['amplxe-cl', '-command', 'stop', '-r', self._output_file])
exit_code = self._proc.wait()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698